Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UPDATE Syntax
Message
From
21/01/2009 16:49:15
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01376029
Message ID:
01376063
Views:
7
>>Can some one give me the correct syntax for the third line in
>>sql2 = "UPDATE TRPSites SET "
>>sql2 += "[AWS]= '" + oReader("AWS") + "' "
>>sql2 += ",[FlexSched]= '" + oReader("FlexSched").ToString + "' "
>>sql2 += "WHERE keyID = " + GridView1.DataKeys(i).Value.ToString()
>>Where FlexSched is a boolean field?
>>Thanks
>
>You're missing comma before FlexSched.
>
>However, don't do it this way, you're opening yourself to SQL injection attacks. Use parameterized approach instead.
>
>Read carefully this thread http://forums.asp.net/t/1254125.aspx

Thanks Naomi, I got it with the parameter method. Wasn't as hard as I expected. (Just a lot more code.) :)
Previous
Reply
Map
View

Click here to load this message in the networking platform