Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
notsosuper
Posting Yak Master
190 Posts |
Posted - 2005-08-17 : 13:33:48
|
if I want to put two update statement in one sub in vb.net. Is in it i need to use ; to add two statement to each other so it can execute onces? |
|
Kristen
Test
22859 Posts |
Posted - 2005-08-17 : 13:43:31
|
YesUPDATE Table1 SET Col1 = 'FOO' WHERE Col2 = 'BAR' ; UPDATE Table2 SET Col2 = 'BAR' WHERE Col1 = 'FOO'should workKristen |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-17 : 13:43:55
|
Why aren't you using stored procedures?Why don't you just have another line of code for the second update?cmdUpdate1.ExecuteNonQuery()cmdUpdate2.ExecuteNonQuery()Tara |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-17 : 13:49:21
|
I'm shocked that you are dirtying your hands with application programming Tara!Kristen |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-17 : 13:52:02
|
Rather than be bored during the slow times, keep busy with a technology that is related to your field but is unfamiliar to you!Tara |
|
|
|
|
|