DBI::Informix LOAD Problem
Posted in 1999
Topics: General Discussion
Hi, I'm trying to execute the LOAD SQL statment in a Perl program using DBI, but I keep getting the -201 syntax error. I have: $str_load = "load from clientes.txt insert into table_name"; $connection->do($str_load); The file is in the local directory. I've tryied in many other ways but the result is always the same. What is wrong or how can I do a load statment using DBI into a Informix database? Thanks, -- Nuno Almeida Despodata - Consultores Internacionais, Lda. Internet: www.despodata.pt/ddata/pessoal/anuno/ E-mail: anuno@despodata.pt
Nuno Almeida wrote:
>
> Hi,
>
> I'm trying to execute the LOAD SQL statment in a Perl program using
> DBI, but I keep getting the -201 syntax error.
>
> I have:
> $str_load = "load from clientes.txt insert into table_name";
> $connection->do($str_load);
>
> The file is in the local directory.
> I've tryied in many other ways but the result is always the same.
> What is wrong or how can I do a load statment using DBI into a
> Informix database?
The problem is that LOAD is NOT an SQL verb it is a dbaccess (and
4GL) built-in command. To execute it from perl you will have to
shell to dbaccess or, better, open a dbaccess session as a pipe and
write the LOAD command to the interactive pipe.
Art S. Kagel