If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > OCI and Input Arrys

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-03, 06:46
Pete2003 Pete2003 is offline
Registered User
 
Join Date: Jan 2003
Posts: 6
Question OCI and Input Arrys

Hi,

C++:
I have a simple C++ array:

char szStrings[3][100];
strcpy(szStrings[0], "Hello");
strcpy(szStrings[1], "There");
strcpy(szStrings[2], "World");

Oracle:
arrType is a table type of varchar2(100)
I have a stored procedure:
Procedure testProc( inArr IN arrType )
DECLARE
nIdx NUMBER;
BEGIN
FOR nIdx IN 0..2 LOOP
INSERT INTO test_table VALUES(inArr(nIdx));
END LOOP;
END

So to call it in C++ (OCI) I would call it with sql statement:

char *sql = "BEGIN testProc(:myArray); END;";

now I need to know how and what do I bind to get this to work ... could anybody please give me an example ....

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On