Publish date: 2004-10-21

Work with transactions through SQL commands (VB)

dim src
set src=CreateObject("ADODB.Connection")

src.open "file name=d:\database\employee.ibp"

dim cmd
set cmd=CreateObject("ADODB.Command")
cmd.ActiveConnection=src

cmd.CommandText="SET TRANSACTION WAIT"
cmd.execute

cmd.CommandText="select count(*) from employee"

dim rs
set rs=cmd.execute

MsgBox rs(0)

cmd.CommandText="COMMIT"
cmd.execute