C++ Programming
02-06-2010, 03:40 PM
Hi All
I am try to get data from oracle.I am facing some problem to get data from oracle table when oracle table data type is RAW.For example i have a table in oracle
create table Test(Item RAW(255));
insert into Test values('1');
insert into Test values('2');
Now i am fetching data from Test table.
CString tabledata=Select * from "system"."Test";
pRecordset=m_pConn->Execute(_bstr_t(tabledata), 0, adCmdText);
_variant_t fetchdata;
fetchdata= pRecordset->GetRows(adGetRowsRest);
LONG lend = fetchdata.parray->rgsabound->cElements;
COleVariant varField;
for (int i = 0; i < lend; i++)
{
int k=0;
for (int j = 0; j < nCount; j++)
{
long index[2] = {j,i};
SafeArrayGetElement(fetchdata.parray,index,&varField);
}
}
out put is
varField = {???}
when i click on varFiled then show like this
tagVARIANT = safearray of UI1 = [1](1 '<span class="code-string">
I am try to get data from oracle.I am facing some problem to get data from oracle table when oracle table data type is RAW.For example i have a table in oracle
create table Test(Item RAW(255));
insert into Test values('1');
insert into Test values('2');
Now i am fetching data from Test table.
CString tabledata=Select * from "system"."Test";
pRecordset=m_pConn->Execute(_bstr_t(tabledata), 0, adCmdText);
_variant_t fetchdata;
fetchdata= pRecordset->GetRows(adGetRowsRest);
LONG lend = fetchdata.parray->rgsabound->cElements;
COleVariant varField;
for (int i = 0; i < lend; i++)
{
int k=0;
for (int j = 0; j < nCount; j++)
{
long index[2] = {j,i};
SafeArrayGetElement(fetchdata.parray,index,&varField);
}
}
out put is
varField = {???}
when i click on varFiled then show like this
tagVARIANT = safearray of UI1 = [1](1 '<span class="code-string">