Hi Mark,
I assume the '(1' in the second and third binds are simply typos.
why don't you do away with the binds, and simply call
$sth2->execute($var1,$var2,$var3,$var4);
it should so the same job.
Gary
On Thursday 26 April 2001 6:03 pm, Mark Martin wrote:
> I'm really not sure what I'm doing here. Are my bindings in the wrong
> place(in the real program they are inside an IF) or do I need
> explicit bindings like this at all?
>
> Cheers
>
> use DBI;
> use DBD::Oracle;
>
> $dbh1 = DBI->connect( "dbi:Oracle:****", "****", "****" );
>
> my $sth2 = $dbh1->prepare("INSERT INTO TABLE VALUES (?,?,?,?)");
>
> open (FILE2, "file.txt")
>
> while (<FILE2>){
> chomp;
> $file2count++;
>
> ($var1,$var2,$var3,$var4) = split(/,/);
>
> $sth2->bind_param(1,$var1);
> $sth2->bind_param(2,$var2);
> $sth2->bind_param(1,$var3);
> $sth2->bind_param(1,$var4);
>
> $sth2->execute();
> }
> close (FILE2);
> _____________________________________________
>
> Mark Martin
> Computer Centre
> National University of Ireland Maynooth
>
> Tel: (01)708 4716/3830
> Fax: (01)628 6249
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000