Const adLockBatchOptimistic = 4
Const adUseClient = 3
Set iconnTrans = CreateObject("ADODB.Connection")
iconnTrans.open _
"Provider=SQLOLEDB.1;Data Source = localhost\sqlexpress;Integrated Security = SSPI;Initial Catalog=dw2"
Set rsTrans = CreateObject("ADODB.Recordset")
rsTrans.CursorLocation = adUseClient
rsTrans.LockType = adLockBatchOptimistic
rsTrans.open "SELECT * FROM ir_Transactions", iconnTrans