execute one insert query and two update query, in one single button click.

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 5
Reputation: mails4vijay is an unknown quantity at this point 
Solved Threads: 0
mails4vijay mails4vijay is offline Offline
Newbie Poster

execute one insert query and two update query, in one single button click.

 
0
  #1
Nov 25th, 2008
i need to execute one insert query and two update query, in one single button click. how can i start write code in vb.net windows application.....
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 32
Reputation: reena12 is an unknown quantity at this point 
Solved Threads: 4
reena12 reena12 is offline Offline
Light Poster

Re: execute one insert query and two update query, in one single button click.

 
0
  #2
Nov 28th, 2008
Hi,

Dim con as new Oledbconnection
con = new Oledbconnection(constring)
con.open()

Dim cmd1 as new OledbCommand
cmd1 = new OledbCommand("Insert Query",con)
cmd1.executenonquery()


cmd1 = new OledbCommand("Update Query 1",con)
cmd1.executenonquery()

cmd1 = new OledbCommand("Update Query 2",con)
cmd1.executenonquery()

con.close()
Reena Mehta

Remember to click on Mark as answer on the post that helped

http://www.indianic.com
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: execute one insert query and two update query, in one single button click.

 
0
  #3
Nov 28th, 2008
open & close connection for every query.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC