|
-
Jan 24th, 2006, 12:36 PM
#1
Thread Starter
Lively Member
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 + "'"
-
Jan 24th, 2006, 12:39 PM
#2
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] )
-
Jan 24th, 2006, 12:41 PM
#3
Re: Error for UPDATE statement
 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?
-
Jan 24th, 2006, 01:37 PM
#4
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
-
Jan 24th, 2006, 01:46 PM
#5
Re: Error for UPDATE statement
 Originally Posted by techgnome
.... since when does one put a comma after the LAST field being updated? ...
Since today ...
-
Jan 24th, 2006, 02:29 PM
#6
Re: Error for UPDATE statement
 Originally Posted by RhinoBull
Since today ...
Great, now my post won't make sense since you deleted yours....
-tg
-
Jan 24th, 2006, 02:31 PM
#7
Re: Error for UPDATE statement
 Originally Posted by techgnome
Great, now my post won't make sense since you deleted yours....
-tg
Fear not tg, I saw it
-
Jan 24th, 2006, 02:53 PM
#8
Re: Error for UPDATE statement
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|