VC++, [ODBC SQL Server Driver], Function sequence error 
Author Message
 VC++, [ODBC SQL Server Driver], Function sequence error

Hi all your happy people!

If I use ACCES ODBC Driver then evrything is OK, but I receive these errors
when I try to connect to a SQL7 database.

Error: failure updating record.
Function sequence error
State:S1010,Native:0,Origin:[Microsoft][ODBC SQL Server Driver]
ERROR:  -1: Function sequence error

Here is a short description of my program flow:
At the beginning of my Log Thread I open the Database.  I then open the
tables as I receive them and keep them in a CObjectList.  Thus will I only
open the database and tables once in my program.  I will receive the Log
entries via a SetEvent wakeup call in another CObjectList.  I then
BeginTrans(), AddNew() fill in the fields, Update(), CommitTrans() for the
each new Log entry.  I will close the Table and database on program exit.

But, on the second Update() for a table, I get this 'sequence' error!  I
upgraded to MDAC2.6 using the SQL2000 Driver with the same result....

Here is my code, I left all the safe stuff out:

/ these functions execute once
   pThis->m_dbDataBase.OpenEx(szDSN, CDatabase::noOdbcDialog)

    // Create a RecordSet and add it to the List
    prsCTelemetry = new CTelemetrySet(&pThis->m_dbDataBase);
    nResult = prsCTelemetry->Open( CRecordset::dynaset, pLogMsg->m_szTable,

/////////////////////// I do this for every transaction
   // Begin the transaction

   // Prepare the new record

   // Get the TagName
   prsCTelemetry->m_szTagName = pLogMsg->m_szTagName;
   // Get the values
   prsCTelemetry->m_dblValue = pLogMsg->m_dValue;

////////////// This is where I get the Exception error
   // Push it to the Database

   // And Commit the transaction

///////////// This I do on exit

  delete prsCTelemetry;
  prsCTelemetry = NULL;

  pThis->m_dbDataBase.Close( );

Fri, 02 May 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ODBC SQL Server Driver ERROR:

2. DAO with SQL-Server ODBC driver

3. problem with SQL Server ODBC drivers

4. SQL server ODBC driver 3.6

5. need license for ODBC driver for SQL server?

6. SQL 7.0 crashed applications using ODBC drivers in VC

7. ODBC function sequence error

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

9. PROBLEM: Accessing SQL SERVER 6.5 from 16 bit ODBC Application (VC++ 1.5)

10. Connection is busy with results - VC++ 1.52, SQL Server 6.5, ODBC

11. ODBC to SQL Server with VC++ (NOT MFC)

12. How do I use SQL server in VC without ODBC


Powered by phpBB® Forum Software