Problem witch OCI ofen()
Date: 29 Apr 1994 10:36:33 GMT
Message-ID: <2pqnvi$mpn_at_nz12.rz.uni-karlsruhe.de>
Hello,
Any ideas or hints ?
#include <iostream.h>
#include "database.h"
extern "C" {
int ofetch(CursorDef*);
short*, char*, short*, short*);
int oclose(CursorDef*);
int, int, short*, short*);
int osql3(CursorDef*, char*, int);
}
CursorDef LDA;
int main()
static CursorDef cursor;
I'm trying to use the OCI functions V1.1(?) with ORACLE V6.0.36 within a C++
program. Everything is working fine. Only with the ofen() function a problem arise.
If I try to fetch more than 35 rows by one call - as in the sample program belowI
get a segmentation fault or floating exception.
#include "util.h"
int olon(CursorDef*, char*, int, char*, int, int);
int ologof(CursorDef*);
int odsc(CursorDef*, int, short*, short*, short*, \
int ofen(CursorDef*, int);
int oopen(CursorDef*, CursorDef*, char*,int, int, char*, int);
int odefin(CursorDef*, int, int*, int, int, int, short*, char*, \
int oexec(CursorDef*);
extern const char* Name;
char* Passwd;
{
static short ind_a[100];
static int grp_id[100];
short rl,rc;
oopen(&cursor,&LDA,(char*)0,-1,-1,(char*)0,-1);
osql3(&cursor,(char*)"select gruppen_id from archiv_site where sitename_p =1",\
-1);
odefin(&cursor,1,(int*)grp_id,sizeof(int),3,-1,ind_a,(char*)0,-1,-1,&rl,&rc); oexec(&cursor);
ofen(&cursor,100);
for ( int i=0; i<100 ; i++)
cout << grp_id[i] << " " ;
cout << endl << flush;
.....
Thanks in advance
Thomas Received on Fri Apr 29 1994 - 12:36:33 CEST