Transaction Processing Causing Weird Stored Procedure Error 
Author Message
 Transaction Processing Causing Weird Stored Procedure Error

When I perform a transaction processing, I get an error:
Error #40002,  Stored Procedure "#odbc# 53869b.....

I'm not using Stored Procedure.  My code is somthing like this.

On Error GoTo Rollack

cn.execute "Begin Transaction", rdExecDirect

rs.edit
.... (update)
rs.update

rs2.edit
...(update)
rs.update

cn.execute "Commit Transaction", rdExecDirect

exit sub

Rollback:

cn.execute "Rollback Transaction", rdExecDirect

If you have any suggestions, I would appreciate them.   I'm using SQL Server
6.5, VB4, RDO 1.0.

Thanks,
Simon



Fri, 01 Sep 2000 03:00:00 GMT  
 Transaction Processing Causing Weird Stored Procedure Error

You should not mix BEGIN TRANSACTION and Edit/Update methods.RDO and ODBC
could get very confused.

If you use Edit/Update you should use BeginTrans/CommitTrans etc.

If you execute INSERT and UPDATE statements then you should execute BEGIN
TRANSACTION and COMMIT TRANSACTION statements.

Even though you don't explicitly use stored procedures, RDO will. It writes
temporary SPs and executes them. It is more efficient in most cases.

Regards,
Simon Jones
PC Pro Magazine



Sat, 02 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Weird Error with ADO, VB6, SQLSRV6.5 Stored procedure

2. Stored Procedure and ADO.net Begin Transaction Code

3. Transactions and Stored Procedures, possible and where?

4. Stored Procedure & Transactions

5. Transaction control between v b and stored procedure

6. calling oracle stored procedures causes errormessage

7. To Stored Procedure or not to stored procedure

8. To stored procedure or not to stored procedure

9. sub report changes its source stored procedure to main report's stored procedure

10. To stored procedure or not to stored procedure

11. ado recordsets from stored procedures, stored procedures have input parameters

12. Doevents/timer while stored procedure processing??

 

 
Powered by phpBB® Forum Software