Click to See Complete Forum and Search --> : ODBC problem....


Aparna
March 30th, 1999, 07:18 AM
Hi,

I've installed Oracle8 server on a Digital Unix m/c and Oracle8 client on Win95. The implementation of CRecordSet is like CRecordSet(CDatabase *). When the CRecordSet::Open is called, I get an error saying


" ODBC static cursors required for snapshot support "


Any immediate response would be greatly appreciated.


Regards,

Aparna.

PeterK
March 30th, 1999, 12:05 PM
Although I don't know the specific answer to your question...


Take a look at the parameters for CRecordset::Open().


I have a few that look like this.


mySet.Open(CRecordset::dynaset, NULL, CRecordset::none);

Bob C.
March 31st, 1999, 04:31 PM
The Oracle 8 ODBC driver that installs with Oracle client does not support

scrolling. Therefore the only CRecordset access allowed is ReadOnly. See Oracle

site for more info. We are having this same problem and have resolved it by

using the Intersolv ODBC driver for Oracle 8.

Aparna
April 5th, 1999, 09:26 AM
Hi,
Thanks for the response. I too got the ODBC error saying that RecordSet is read-only. Can anyone tell me where I can find the Intersolv ODBC driver for Oracle 8.
Thanx,
Aparna.

Steve McNeese
April 5th, 1999, 09:40 AM
This is not true! I am using Oracle 8 ODBC without any problems. Check the Open() method for options. The ODBC driver only supports snapshot mode. Below is a snipit of code from my application. I create one instance of the CDatabase object and open that. Then for each recordset within that database, I assign the m_pDatabase member variable. This keep from opening multiple connections to the database.

// Get user logon information one time and store
CAWIMSApp* pApp = (CAWIMSApp*)AfxGetApp();
int done=FALSE;
int error = FALSE;
CString t_cConnect;
CLogon logonDlg;
while(!done) {
if(logonDlg.DoModal()==IDCANCEL)
exit(1);
t_cUser=logonDlg.m_User;
t_cPass=logonDlg.m_Pass;
if(t_cUser.CompareNoCase("inquiry")==0)
// t_cConnect="ODBC;UID=inquiry;PWD=inquiry;DSN=AWIMS";
t_cConnect="UID=inquiry;PWD=inquiry;DSN=AWIMS";
else
// t_cConnect.Format("ODBC;UID=%s;PWD=%s;DSN=AWIMS",t_cUser,t_cPass);
t_cConnect.Format("UID=%s;PWD=%s;DSN=AWIMS",t_cUser,t_cPass);
error=FALSE;
try {
// pApp->t_AWIMS.Open(NULL,FALSE,FALSE,t_cConnect);
pApp->t_AWIMS.OpenEx(t_cConnect,CDatabase::noOdbcDialog | CDatabase::useCursorLib);
}
// Catch any DB exceptions that may have been thrown by the Open call
catch (CDBException* e) {
AfxMessageBox(e->m_strError,MB_ICONEXCLAMATION);
error=TRUE;
}
done=!error;
}
rsCapability.m_pDatabase=&(pApp->t_AWIMS);
rsCapability.m_strFilter="USERNAME = ?";
rsCapability.m_USERNAMEParam=t_cUser;
if(!rsCapability.Open(CRecordset::snapshot, NULL, CRecordset::none)) {
AfxMessageBox(IDP_FAILED_OPEN_DATABASE);
}


Steven M. McNeese
steven.mcneese@boeing.com

Aparna
April 6th, 1999, 08:55 AM
Hi
I tried using the OpenEx function of CDatabase class.
But still it gives the same error ("No cursor name available").
Our Oracle 8 ODBC driver version is, 8.0.3.0.2 and the Cursor library
version is 3.510.3002.13 (odbccr32.dll) as seen from the ODBC administrator
from control panel.
(We downloaded this driver from Oracle site)

Which version of Oracle ODBC driver are you using ?
We also found that this problem is not seen in installations using
Oracle ODBC driver 8.0.4.0.

Any help or pointer would be of great help.

Thanks in advance
Aparna