Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / March 2005

Tip: Looking for answers? Try searching our database.

Load using VB6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
grigno - 07 Mar 2005 08:46 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.