I have a VB6 app that does a SELECT to determine if there any rows that need to be processed. When there are I need to wrap the executes inside the loop with the BeginTrans and CommitTrans. Problem is when I get done and the commit is complete I do a MoveNext as the last statement in the loop (after the commit) and I get an error. Since the INSERTS worked (I can see them in the table) why the error when I issue the MoveNext on the
Do While SLSalesOrder_Tb.EOF = False
if that is outside the Trans?
What's the error message?
The error I get in the logging process is
"01-03-200615:49:28 SQL Error Error Number: -2147418113 Description: Catastrophic failure Source: Microsoft OLE DB Provider for ODBC Drivers SQL State: Native Error: 0"
Note that the transactions did get updated and inserted as expected. I don't know why this error. I have attached the actual code which runs with no errors if the begin and commit are removed. If I move them around I get similar errors.
I just took a REALLY quick look at your code - there's a lot there! Are you sure you're not closing SLSalesOrder_Tb before trying to MoveNext? It's a bit confusing trying to read the code with all the commented out lines;-)
Is this error happening when you run the code exactly as you uploaded it?
What is your backend database? I have heard of this same error occurring when accessing a MySQL db using VB6 and ADO. The fix was to download the latest version of the MyODBC driver.
I am using SQL Server 2K. The code flows just fine if I take out the trans instructions. Basically I just need it to commit to the INSERTS. I moved the begin higher as when I had it right before the first INSERT it did not like that at all.
By Martin in forum VB Classic
Last Post: 12-03-2001, 03:53 AM
By Khalizan in forum VB Classic
Last Post: 11-28-2001, 01:32 AM
By James Barbetti in forum ASP.NET
Last Post: 11-06-2001, 01:13 PM
By John M. in forum Database
Last Post: 05-17-2001, 03:01 PM
By Chris.G in forum VB Classic
Last Post: 11-13-2000, 03:16 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center