473,412 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

problem with DataBase

hi
Hi
I have a problem with a dataset. Im trying to update the database but
it doesn't updating the database
this.oleDbConnection1 .Open ();
OleDbCommand cmd = new OleDbCommand ("",this.oleDbConnection1);
cmd.CommandText = "UPDATE Manufactor SET ,factor_Size="
+company.manufactorfloor_get ()+ " WHERE player_ID='"+
this.Session["playerID"].ToString()+"'";//,Finished_Product="+
this.company.fnsdprod_get () + ",Finished_Product_Space="+this.company
..machine_out_put_get ()+ ",Machine_Num="+ this.company.machinenum_get
()
this.oleDbDataAdapterManufactor .UpdateCommand =cmd;
this.lerrorlable .Text =this.oleDbDataAdapterManufactor .Update
(this.dsManufactor1).ToString ();
this.oleDbConnection1 .Close ();
Nov 16 '05 #1
2 903
Hi,

Does it thrown an exception ?

I think the error is in this line (it think it should be without comma (SET
factor_Size))
cmd.CommandText = "UPDATE Manufactor SET ,factor_Size="
--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Lian" <li*****@hotmail.com> wrote in message
news:1a**************************@posting.google.c om...
hi
Hi
I have a problem with a dataset. Im trying to update the database but
it doesn't updating the database
this.oleDbConnection1 .Open ();
OleDbCommand cmd = new OleDbCommand ("",this.oleDbConnection1);
cmd.CommandText = "UPDATE Manufactor SET ,factor_Size="
+company.manufactorfloor_get ()+ " WHERE player_ID='"+
this.Session["playerID"].ToString()+"'";//,Finished_Product="+
this.company.fnsdprod_get () + ",Finished_Product_Space="+this.company
.machine_out_put_get ()+ ",Machine_Num="+ this.company.machinenum_get
()
this.oleDbDataAdapterManufactor .UpdateCommand =cmd;
this.lerrorlable .Text =this.oleDbDataAdapterManufactor .Update
(this.dsManufactor1).ToString ();
this.oleDbConnection1 .Close ();

Nov 16 '05 #2
Hi,

Try to use parameters, the thing with such a construction is that you need
to escape the especial chars for SQL , example if
this.company.machine_out_put_get ()
return Moe's ( very good mexican restaurant btw ) it will give you error
as the ' will be interpreted as part of the SQL query.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


"Lian" <li*****@hotmail.com> wrote in message
news:1a**************************@posting.google.c om...
hi
Hi
I have a problem with a dataset. Im trying to update the database but
it doesn't updating the database
this.oleDbConnection1 .Open ();
OleDbCommand cmd = new OleDbCommand ("",this.oleDbConnection1);
cmd.CommandText = "UPDATE Manufactor SET ,factor_Size="
+company.manufactorfloor_get ()+ " WHERE player_ID='"+
this.Session["playerID"].ToString()+"'";//,Finished_Product="+
this.company.fnsdprod_get () + ",Finished_Product_Space="+this.company
.machine_out_put_get ()+ ",Machine_Num="+ this.company.machinenum_get
()
this.oleDbDataAdapterManufactor .UpdateCommand =cmd;
this.lerrorlable .Text =this.oleDbDataAdapterManufactor .Update
(this.dsManufactor1).ToString ();
this.oleDbConnection1 .Close ();

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mithun Verma | last post by:
Hello All, I have a Windows application that uses Crystal Reports 9 (bundled Version) developed using VS.NET 2003 on a windows server 2003 m/c. The application has to be deployed on the client...
3
by: Jagdip Singh | last post by:
Hi, We are facing problem accessing to DB2. Seems like database manager is down I tried starting it using db2start but it was neither showing any messages nor returning to command prompt...
2
by: Robert Stearns | last post by:
After working well for most of a week, my application with the mysterious php/db2 problem is now failing again. No one has worked on the php code this week. We're running DB2 8.1.5, php 4.3.6...
2
by: Robert McGregor | last post by:
Hi all, I've got a Front End / Back End database that was working just fine. One day i opened the FE to find that if I tried to open one of the linked tables from the database window, nothing...
6
by: lenny | last post by:
Hi, I've been trying to use a Sub or Function in VBA to connect to a database, make a query and return the recordset that results from the query. The connection to the database and the query...
4
by: Reinier Beeckman | last post by:
Hi got the following problem, it's more a programming problem then really a database problem. I have a Database class which connects to a mySQL database on the network. In WebForm1.aspx i connect,...
3
by: Juan Antonio Villa | last post by:
Hello, I'm having a problem replicating a simple database using the binary log replication, here is the problem: When the master sends an update to the slave, an example update reads as follows:...
22
by: b_r | last post by:
Hi, I'm trying to make a simple operation (insert into DB) in VB 2005 and SQL Server. The code is as follows: Dim sConnectionString As String = _ "Data...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi, I wonder if someone could shed some light on this one for me. I have developed a web app in VS2005 with the built in server. It uses an sql database, everytihng works. I need to test it...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.