OCI and binding arrays
From: Nicolay Aslaksen <nas_at_ementor.no>
Date: 22 Nov 2002 10:33:40 GMT
Message-ID: <Xns92CE765F52A32nasementorno_at_195.58.103.121>
[Quoted] I am coding a C++ application on a windows 2000 platform (it will later be running on Linux and AIX).
long buffSize = 4;
long *IDlist = new long[buffSize];
Date: 22 Nov 2002 10:33:40 GMT
Message-ID: <Xns92CE765F52A32nasementorno_at_195.58.103.121>
[Quoted] I am coding a C++ application on a windows 2000 platform (it will later be running on Linux and AIX).
I would like to execute a select statement where the WHERE-part is an array
(of id's):
something like this in C++:
long buffSize = 4;
long *IDlist = new long[buffSize];
IDlist[0] = 982374; IDlist[1] = 324443; IDlist[2] = 989485; IDlist[3] = 430904;
sql = "SELECT ref(x) FROM persons p WHERE p.id IN :id";
Prepare (sql);
OCIBindByPos(stmtp, bindp, errhp, 1, (dvoid*)&IDList, buffSize,
(ub2)SQLT_INT, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)0, (ub4 *)0,
(ub4)OCI_DEFAULT);
I have seen several questions about similar problems/whishes, but I have
not found any answers to the problem.
Is there anyone who has a solution to this problem?
Any help is appreciated.
Nicolay Aslaksen
Ementor Norway ASA
Received on Fri Nov 22 2002 - 11:33:40 CET