SQL Server error when updating via CRecordset 
Author Message
 SQL Server error when updating via CRecordset

I'm using the MFC 'CRecordset' class to connect to a Microsoft SQL
Server database via ODBC.  Everything works fine, except that after
using CRecordset to select & update a group of records (about 4,000
records selected, about 300 of them are updated), SQL Server generates
the error 910.

The SQL Server documentation for this error is: "Could not allocate a
new object descriptor for required system catalog in database '%d'.
Another database must be closed or objects in another database dropped
in order to open this database."

The database in question is 'tempdb', which I believe is used by SQL
server internally.  I'm not sure what is happening, but I have to close
down the server and restart it in order to recover.

I'm currently converting a program that was using Borland's BDE to
connect to the database, and it never had this problem.  I believe that
CRecordset can be set up to use transcation processing, but I'm using
the default (whatever is 'no transaction processing').  In any case, for
any record I update, I create a new CRecordset, do the select & Update
and close and delete the CRecordset, which should complete any
transaction (if its using transaction processing), so I don't think its
trying to wrap all 400 updates in a single transaction.

Has anyone encountered this problem before?

************************
Tim Bratsos
Citizen 1 Software, Inc.

(415) 882-9404, ext. 812
************************



Fri, 02 Nov 2001 03:00:00 GMT  
 SQL Server error when updating via CRecordset
Hi Tim,

Access is universally loathed by DBA's because it holds databases and
tables open forever and also generates lockings numbering in the tens
of thousands.  Most likely you are running out of locks at the server
level.  You will either have to convince your DBA to max-out the
maximum locks per user and/or per server, or resolve your update
queries in smaller pieces.

Regards,
Kurt



Quote:
>I'm using the MFC 'CRecordset' class to connect to a Microsoft SQL
>Server database via ODBC.  Everything works fine, except that after
>using CRecordset to select & update a group of records (about 4,000
>records selected, about 300 of them are updated), SQL Server generates
>the error 910.

>The SQL Server documentation for this error is: "Could not allocate a
>new object descriptor for required system catalog in database '%d'.
>Another database must be closed or objects in another database dropped
>in order to open this database."

>The database in question is 'tempdb', which I believe is used by SQL
>server internally.  I'm not sure what is happening, but I have to close
>down the server and restart it in order to recover.

>I'm currently converting a program that was using Borland's BDE to
>connect to the database, and it never had this problem.  I believe that
>CRecordset can be set up to use transcation processing, but I'm using
>the default (whatever is 'no transaction processing').  In any case, for
>any record I update, I create a new CRecordset, do the select & Update
>and close and delete the CRecordset, which should complete any
>transaction (if its using transaction processing), so I don't think its
>trying to wrap all 400 updates in a single transaction.

>Has anyone encountered this problem before?

>************************
>Tim Bratsos
>Citizen 1 Software, Inc.

>(415) 882-9404, ext. 812
>************************



Sat, 03 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SQL Server error when updating via CRecordset

2. Error updating SQL-Server record via ODBC (CRecordset)

3. Problem updating SQL Server through ODBC/CRecordset

4. Error updating decimal values via CRecordset::Udate

5. CRecordset: Error when adding records SQL Server view

6. SQL Server with CDatabase/CRecordset and server cursors

7. CRecordset and SQL Server Linked Server View

8. CRecordset updated via stored procedure

9. Refresh-Posting: UNICODE via ODBC on SQL-Server???

10. Accessing MS SQL-Server via ADO

11. Refresh-Posting: UNICODE via ODBC on SQL-Server???

12. Refresh-Posting: UNICODE via ODBC on SQL-Server???

 

 
Powered by phpBB® Forum Software