|
-
Mar 4th, 2004, 02:57 PM
#1
Thread Starter
yay gay
sql sintax help
Code:
command2.Parameters.Add("Nicks", nick);
command2.Parameters.Add("Address", ftp);
command2.CommandText = "UPDATE T_Users {0} WHERE Index LIKE '" + dr["Index"] + "'";
I know this is vb.net forum but you should understand it. I'm getting an error that leads me to believe its some sintax problem.
Any suggestions?
\m/  \m/
-
Mar 4th, 2004, 03:26 PM
#2
Sleep mode
Try
Either this :
command2.CommandText = "UPDATE T_Users {0} WHERE Index LIKE '" + dr[Index] + "'";
or this
command2.CommandText = "UPDATE T_Users {0} WHERE Index LIKE ' + dr[Index] + ' ";
-
Mar 4th, 2004, 04:38 PM
#3
Thread Starter
yay gay
hmm still the same error
any ideas?
\m/  \m/
-
Mar 4th, 2004, 04:46 PM
#4
You don't have any set or parameters in your query.
VB Code:
command2.CommandText = String.Format("UPDATE T_Users SET Nicks = @Nick, Address = @Address WHERE Index LIKE '{0}'",dr[Index])
command2.Parameters.Add("@Nicks", nick);
command2.Parameters.Add("@Address", ftp);
-
Mar 4th, 2004, 04:48 PM
#5
Thread Starter
yay gay
\m/  \m/
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
|