Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

USING ARRAYS in EMBEDDED SQL

Status
Not open for further replies.

logic4fun

Programmer
Apr 24, 2003
85
US
hi guys,
i am trying to use an array of strings to pass into a database as host variables it is yelling at me..is there any way to do that..here is the sample

EXEC SQL BEGIN DECLARE SECTION;
char **input;
long customerIdentifier;
long cardNumber;
EXEC SQL END DECLARE SECTION;

EXEC SQL INSERT INTO MY.Table (A,B,C,D,E)
values :)input[1],:input[2],:input[3],:customerIdentifier,:cardNumber);

************
the above chunk throws me an error saying i cannot use input[] any Suggestions
Thanks in Advance
 
Hi MarcLodge...
i am running this under unix environment..on an AIX box..using DB2
 
Sorry logic, this is outside of my experience. I'm still not sure what language you're writing this is as you obviously have host variables, and that's where the problem seems to lie.

See if any of these help....
 
Did you have malloc mem for the var: **iput?

You must malloc mem before use it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top