tags:

views:

26

answers:

1

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. :)

A: 

Try recompiling.

codingguy3000
@codingguy3000 Recompiling works fine. But the fact is the App is going to be deployed in the field as a service. There will no stop or start mechanisms.
jmaniac