Home » RDBMS Server » Server Administration » Please help me about array fetch!
Please help me about array fetch! [message #369150] |
Wed, 29 March 2000 22:10 |
xiaoliang
Messages: 6 Registered: March 2000
|
Junior Member |
|
|
hi,
Please give me some suggestion about this problem.
I run my program and call the following program codes. Then WindowsNT Server say:
The instruction at "0x6f043465" referenced memory at "0x00000008". The momory could not be written.
I try to use the new technique of oracle8i. Using Array to get select-list in one time! Could anyone find out why? I could not find anyone has a sample program like this new technique, please help.
char domainidMAX_ROUTE_NUM33; /*for get select-list result, domain_id on database is char(32) */
sprintf(sqlStatement,"select domain_id from domain where domain_ip=\'%s\'",agentIP ) ;
if(status = OCIStmtPrepare(stmthp, errhp, (unsigned char *)sqlStatement,(ub4) strlen((char *) sqlStatement),(ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT))
{
checkerr(errhp, status);
return -1;
}
OCIDefine *dfnhp1;
dfnhp0 = (OCIDefine *) 0;
sb2 ind;
if(status = OCIDefineByPos(stmthp, &dfnhp0, errhp, (ub4) 1,(dvoid *) domainid0, 33, (ub2) SQLT_STR, (dvoid *) &ind,(ub2 *)0,(ub2 *) 0, (ub4)OCI_DEFAULT))
{
checkerr(errhp, status);
return -1;
}
if(status = OCIDefineArrayOfStruct(dfnhp0, errhp, sizeof(domainid0),0,0,0))
{
checkerr(errhp, status);
return -1;
}
//I do not know if the iter==MAX_ROUTE_NUM is to get all select-rows here:
if(status = OCIStmtExecute(svchp, stmthp, errhp, (ub4) 0, MAX_ROUTE_NUM,(CONST OCISnapshot*) 0, (OCISnapshot*) 0,(ub4) OCI_DEFAULT))
{
checkerr(errhp, status);
return -1;
}
|
|
|
Goto Forum:
Current Time: Thu Jan 02 22:19:35 CST 2025
|