September 18th, 2003 12:52 AM
#1
Oracle Database programming in VC++ using ADO
I am able to connect to oracle database and insert the records into the table using ADO.But i am not able to retrieve integer values from the oracle database.It is retrieving zero.
Can some body help me.
September 18th, 2003 02:36 AM
#2
Post your code.
Post the class declartion, and the code you're using to retrieve the number.
September 24th, 2003 12:46 AM
#3
while(!dbase.m_pRecordset->adoEOF)
{
FieldPtr pfIDNO,pfldLastName;
_variant_t vIDNO,vLastName;
int nIDNO;
char c_szLastName[30];
//pfIDNO = dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_LASTNAME");
//vIDNO = pfIDNO->Value;
//nIDNO = vIDNO.iVal;
/* pfIDNO = dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_ID");
vIDNO = pfIDNO->Value;
nIDNO = vIDNO.iVal;
// WideCharToMultiByte(CP_ACP, 0, vLastName.bstrVal, -1,
// c_szLastName, sizeof(c_szLastName), NULL, NULL);*/
//TheValue = dbase.m_pRecordset->GetCollect("EMP_ID");
_bstr_t a = dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_ID")->GetValue().lVal;
/* long l;
l=dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_ID");
strcpy(tmp,(char *)_bstr_t(TheValue) );
m_cmbEmpID.AddString(tmp);*/
dbase.m_pRecordset->MoveNext();
/*TheValue=dbase.m_pRecordset->GetCollect((_variant_t)"EMP_ID");
strcpy(tmp,(char *)_bstr_t(TheValue) );
m_sLastName=tmp;
dbase.m_pRecordset->MoveNext();*/
}
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks