I have this txt file, formatted with the '|' character between columns, and this script generated by the db2 LOAD wizard:
LOAD FROM "" OF DEL MODIFIED BY ANYORDER COLDEL|
METHOD P (1, 2, 3) MESSAGES ""
REPLACE INTO DB2ADMIN.WEB_NOHAB_CONSOLI (RUC, RAZSOC, FECHA)
NONRECOVERABLE INDEXING MODE AUTOSELECT LOCK WITH FORCE;
The script just works ok. Now I have to call it from my VFP form (cStatement contains all the LOAD from above):
SQLEXEC(nMyConn,cStatement)
but it fails with error SQL0104N
I've tried with "" and '' for the path parameters but the problem persists.
Any Ideas?
解决方案
The DB2 CLP can run LOAD and other non-SQL commands that client applications cannot send over a driver-based connection. DB2 provides a system stored procedure called ADMIN_CMD, which client connections (ODBC, JDBC, etc.) can call to initiate any of several popular administrative commands, including LOAD.