Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> OCI and binding arrays
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++:
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 - 04:33:40 CST
![]() |
![]() |