Error for UPDATE statement
can someone guide me wats wrong with this statement??
sqlString3 = "UPDATE USER_LOGIN_T SET PASSWORD = '" + TextPassword.Text _
+ "', LOGIN_NAME = '" + TextUser.Text + "', ACCOUNT_TYPE = '" + ComboOccupation.Text _
+ "' WHERE NRIC = '" + TextNRIC.Text + "'"
Re: Error for UPDATE statement
It looks ok... what is the error, and what are the data types of the fields?
(one thing tho, password should be in square brackets, eg: [password] )
Re: Error for UPDATE statement
Quote:
Originally Posted by xiaofeiii
can someone guide me wats wrong with this statement??
sqlString3 = "UPDATE USER_LOGIN_T SET PASSWORD = '" + TextPassword.Text _
+ "', LOGIN_NAME = '" + TextUser.Text + "', ACCOUNT_TYPE = '" + ComboOccupation.Text _
+ "' WHERE NRIC = '" + TextNRIC.Text + "'"
First, lose the + signs unless you wish to add two numbers together.
For concantination use the & sign.
As si_the_geek asked, are you getting an error message?
Re: Error for UPDATE statement
RB.... since when does one put a comma after the LAST field being updated?
xiaofeii - still waiting ot hear what the error message is... that will go a loooong way to helping you out.
-tg
Re: Error for UPDATE statement
Quote:
Originally Posted by techgnome
.... since when does one put a comma after the LAST field being updated? ...
Since today ...
Re: Error for UPDATE statement
Quote:
Originally Posted by RhinoBull
Since today ...
Great, now my post won't make sense since you deleted yours....
-tg
Re: Error for UPDATE statement
Quote:
Originally Posted by techgnome
Great, now my post won't make sense since you deleted yours....
-tg
Fear not tg, I saw it :D
Re: Error for UPDATE statement
:lol: :lol: :lol: :lol: :lol: