R
Rotsey
Hi,
I did not know how to get my post to the top again so I have reposted this
problem
I was getting a execution cancelled error when running the code using
transactions below.
Well the code is quite long. But the crux of it is like this.
Public Sub ProcessInvoiceData(CustNoDetails)
objws.Begintrans
For cntr = 1 to NmberOfInvoiceToCreate
invno = CreateInvoiceNumber(CustNoDetails(cntr))
SQL = "SELECT * FROM Invoices WHERE invNumber = " & invno
Set rs2 = gobjDBodbc.OpenRecordset(sql, dbOpenSnapshot)
IT BOMBS HERE AT THE 2ND ITERATION AS THE invno HAPPENS TO BE THE SAME AS
THE FIRST
INTERATION INVOICE
if rs2.bof then
CreateInvoice(invno)
Endif
Next
objws.CommiTrans
As you can see it fails to do with querying the first invoice added to the
transaction.
If you need more info let me know.
rotsey
I did not know how to get my post to the top again so I have reposted this
problem
I was getting a execution cancelled error when running the code using
transactions below.
Well the code is quite long. But the crux of it is like this.
Public Sub ProcessInvoiceData(CustNoDetails)
objws.Begintrans
For cntr = 1 to NmberOfInvoiceToCreate
invno = CreateInvoiceNumber(CustNoDetails(cntr))
SQL = "SELECT * FROM Invoices WHERE invNumber = " & invno
Set rs2 = gobjDBodbc.OpenRecordset(sql, dbOpenSnapshot)
IT BOMBS HERE AT THE 2ND ITERATION AS THE invno HAPPENS TO BE THE SAME AS
THE FIRST
INTERATION INVOICE
if rs2.bof then
CreateInvoice(invno)
Endif
Next
objws.CommiTrans
As you can see it fails to do with querying the first invoice added to the
transaction.
If you need more info let me know.
rotsey