Hello,
I have a question relating to isqlperl v1.2, running on a SPARC10 (SunOS4.1.3).
Frankly, I'm not sure whether this is a perl question or an Informix
question, as I'm fairly new to both.
What I am trying to do is insert data from an array (obtained by slurping
lines of a text file using <> ) into a text blob (a column of
type TEXT). I gather that to do this in ESQL/C one uses the loc_t
type...How does one do this in isqlperl?
I, naively, tried something like the following:
# Reading the data into the array @ary
#
$count = 0;
open(FILE, "datafile") || die "Can't open file! $!\\n";
while(<FILE>) {
$ary[$count++] = $_;
}
# prepare cursor to insert @ary into 'mydata' table
#
$table = 'mydata';
$insert = &isql_open(<<EOI) || die $isql_code;
insert into $table(inv_data) values(?)
EOI
# insert it
#
&isql_execute($insert, (@ary)) || die $isql_code;
That last line is bad, giving the error
"-1213 Character to numeric conversion error"
Any and all help would be greatly appreciated!
Thanks in advance,
-MK
--
Michael Kerry |"Why is a raven like a writing-desk?"
mkerry@eng.umd.edu | -The Mad Hatter
Institute for Systems Research |"Because the notes for which they are noted
University of Maryland | are not noted for being musical notes." -Sam Loyd