Hi,
I use Informix database and i have a problem
Sql statements LOAD and UNLOAD dont work from the application via ODBC
Program report syntax error
Some sugestions ?
Best regards,
Hi,
I use Informix database and i have a problem
Sql statements LOAD and UNLOAD dont work from the application via ODBC
Program report syntax error
Some sugestions ?
Best regards,
Again, unless you can do this from a batch file, I believe your best bet is going to be looping through recordsets and handling the file access manually. I.e. in pseudocode:
'UNLOAD
Open recordset with SELECT * FROM table
Open file for write access
Until recordset.EOF
{ Write record to file (with delimiters)
Move to next record
}
Close recordset
Close file
'LOAD
Open file for read access
Until file.EOF
{ Read line from file
Parse line (Split on delimiters) and generate SQL INSERT statement
Insert record into database using command .Execute method
}
Close file
Thanks Rick for reply,
Good solution,
Like i found on internet LOAD FROM and UNLOAD are not SQL statements ... They are only DbAccess options and DbAccess use own subrutines for that.
So i writed own functions
Regards,