View Single Post
  #8 (permalink)  
Old 08-18-2008, 01:43 AM
Hennell Hennell is offline
Junior Member
 
Join Date: Nov 2007
Posts: 19
Default

Is there anyway to use these parameter things with an UPDATE Sql command or do they only help with Inserts?

Edit: Got it! Turns out I'd got a comma in the wrong place which is why it didn't seem to be working! (Teach me to code when I should be in bed )

Anyway, for anyone else with such problems:
Code:
cmd.CommandText = "Update [Table] SET Col1 = @Value1, Col2 = @Value2 WHERE col3 = [whatever]"
works fine, just don't forget to watch the commas!

Last edited by Hennell : 08-18-2008 at 02:01 AM.
Reply With Quote