Hi,
I'm tring to execute LOAD command with VB6.
..connection...
strSQL = "load from c:\temp\pippo.dat of del modified by coldel'|'
insert into MYTAB"
cnnMain.Execute (strSQL)
This code returns an error like this:
[IBM][CLI Driver][DB2/NT] SQL0007N the character "\" after "load from
c:" is not valid. SQLSTATE=42601
The same command in a file .bat works fine.
How can I resolve this prblem?
thanks.
Gert van der Kooij - 07 Mar 2005 13:12 GMT
> Hi,
>
[quoted text clipped - 15 lines]
>
> thanks.
Maybe "load from 'c:\temp\pippo.dat' of del modified by ......" will
work?
Christos Kalantzis - 07 Mar 2005 19:05 GMT
You are trying to run it from within ADO. Load is not an "SQL"
statement or an internal dbms command. It is a application that
connects to the DB, reads a file and inserts the data into the DB.
What you have to do is run it from a Shell. I am not a VB expert,
however you might find that it runs out-of-process. If you are a good
VB programmer you will figure out how to run it in-process.
Shell(pathname[,windowstyle])
Bottom line, run it from a shell in VB.
Hope this helps,
Christos Kalantzis
> Hi,
>
[quoted text clipped - 15 lines]
>
> thanks.
Knut Stolze - 08 Mar 2005 07:09 GMT
> Hi,
>
[quoted text clipped - 13 lines]
>
> How can I resolve this prblem?
LOAD is a DB2 command and no SQL statement. You could use the call to the
db2Load API into a stored procedure and call the procedure from your
application. The CALL is a SQL statement.

Signature
Knut Stolze
Information Integration
IBM Germany / University of Jena