943,904 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1783
  • VB.NET RSS
Nov 25th, 2008
0

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

Expand Post »
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.....
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mails4vijay is offline Offline
5 posts
since Nov 2008
Nov 28th, 2008
0

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

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()
Reputation Points: 12
Solved Threads: 4
Light Poster
reena12 is offline Offline
32 posts
since Oct 2008
Nov 28th, 2008
0

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

open & close connection for every query.
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,140 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: pass tableadapter as parameter to module
Next Thread in VB.NET Forum Timeline: Updating combobox with items





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC