Home » SQL Server

Fix for the SQL Error 16943

One of my program in VC++ uses the MS SQL Server 2000 as the DB and the app was coded in VC++ 6.0. The DB part was governed by the MFCs CRecordset and so on. The data is populated through the sequence as follows

1. CRecordset::AddNew();

2. Fill all the columnar data of the record

3. CRecordset::Update()

The problem now surfaces is, when the app running if the Optimization Job is done then the 3rd step throws the following SQL Error(By SQL Profiler) 

Msg 16943, Level 16, State 4
Could not complete cursor operation because the table schema changed after the cursor was declared.

Please help me out in fixing this. Thanks in advance. :)


2 Answers Found


Answer 2

Thanks Dimant,

But Aaron dealt with the fix  in the SQL part but as I mentioned earlier its with MFC classes.

Please also note that I am not using any Stored Procedures or any Cursors anywhere and all through the program.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure