Error-ODBC static cursors required for snapshot support. 
Author Message
 Error-ODBC static cursors required for snapshot support.

Hello !!

I  am working on VC ++. I am connecting to the database using Intersolv's
driver and client. The database I am referring to is Sybase database .
Presently we are using only the demo version of the sybase driver.  Described below is the exact problem that I am experiencing.

I am having a problem using CRecordset of MFC . I have done the following
Opened database using CDatabase
CDatabase database;
Instantiated CRecordset recordset(&database);
opening the recordset with following options recordset.Open(CRecordset::snapshot,query);

This gives an exception - ODBC static cursors required for snapshot support.

However the same command  works when I am connecting to an Access database. Given below is the portion of the code where I am attaching to the database.

The piece of code that creates problem. void CMainFrame::OnTest()
if( !m_dbCust.IsOpen( ) &&
!m_dbCust.OpenEx( "DSN=tester" ) )
return  ;

CString sqlStatement(_T("SELECT * FROM [table]")); m_pRecordSet->Open(
CString str;
CDBVariant var;
m_pRecordSet->GetFieldValue(1,var,DEFAULT_FIELD_TYPE); m_pRecordSet->MoveNext();
str= *(var.m_pstring);


where m_dbCust is  CDatabase object and m_pRecordSet is CRecordset Object.

Thanking You

Mon, 15 Jan 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ODBC cursors required for snapshot support, why?

2. ODBC cursors required for snapshot support, why?

3. Dynaset/Snapshot ODBC problem

4. ODBC snapshot, dynaset problem?

5. ODBC/MFC Cursor Error

6. ODBC Cursor Lib vs Driver Cursor

7. ODBC Error in static link

8. ODBC errors on VC++ startup - ODBC error.jpg (0/1)

9. fatal error C1189: #error : MFC requires C++ compilation (use a .cpp suffix)

10. C# -- Required Runtime Support

11. ODBC API required

12. Please let me know where to find odbc.inf file required by SQLInstallODBC


Powered by phpBB® Forum Software