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

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

open & close connection for every query.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.