954,157 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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

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.....

mails4vijay
Newbie Poster
5 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

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()

reena12
Light Poster
32 posts since Oct 2008
Reputation Points: 12
Solved Threads: 4
 

open & close connection for every query.

Jx_Man
Nearly a Senior Poster
3,328 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You