Sameer Motwani
2004-02-04 22:41:21 UTC
Hi,
I am using MFC ODBC classes in my VC++ application for database accesss (on
a SQL Server/Access Database).
Some times after opening a Recordset I have to use the
CRecordset::GetFieldValue( LPCTSTR lpszName, CDBVariant& varValue, short
nFieldType = DEFAULT_FIELD_TYPE )
method of the CRecordset object to obtain field values. The above method
works fine with ODBC drivers for Jet but when I use ODBC for SQL Server it
throws the following exception
State:S1002,Native:0,Origin:[Microsoft][ODBC SQL Server Driver] Invalid
Descriptor Index
I don't understand why the Microsoft SQL Server ODBC Driver is throwing this
exception.
Please help me!
Sameer
I am using MFC ODBC classes in my VC++ application for database accesss (on
a SQL Server/Access Database).
Some times after opening a Recordset I have to use the
CRecordset::GetFieldValue( LPCTSTR lpszName, CDBVariant& varValue, short
nFieldType = DEFAULT_FIELD_TYPE )
method of the CRecordset object to obtain field values. The above method
works fine with ODBC drivers for Jet but when I use ODBC for SQL Server it
throws the following exception
State:S1002,Native:0,Origin:[Microsoft][ODBC SQL Server Driver] Invalid
Descriptor Index
I don't understand why the Microsoft SQL Server ODBC Driver is throwing this
exception.
Please help me!
Sameer