I am in the process (hopefully close to being finished) of developing a small, stand-alone EXE (in VFP) that will take data from FP2.6 tables and update the information in an Oracle 8i database. I have the data model created and the tables created in Oracle. In my VFP application, I have a form with 2 timers (one that fires every so often and updates the Oracle tables with any newly added records since the last incremental update and another timer that does a complete DELETE and INSERT of the full table's records).
I cannot use a DBC as the tables are stand-alone tables but in FPW2.6 file format.
On the incremental timer, I can make the connection to the Oracle database but adding records is tripping me up. I was hoping I could do something like:
APPEND FROM <fpw2.6_TableName> WHERE recno(fpw2.6_TableName) > N
where N is the number of records in the Oracle table (which I still haven't figured out how to determine the record count). This way, we are just appending newly added records. However, the APPEND FROM doesn't work. I really don't want to have to do INSERTs with the field names because putting together the list of fields and values will take forever. I've got 57 tables to update (some with only 2-3 fields, others with 35-40) and having to put each field name in for each table will be very labor-intensive.
Is there a method to append a block of records from a FoxPro table to an Oracle table using the SQLExec function?
Thanks in advance for any and all help.
PS. If someone knows how, using the SQLExecute function, to get the number of records in the Oracle table (I tried CALCULATE cnt() with no luck) I'd really appreciate it.
I cannot use a DBC as the tables are stand-alone tables but in FPW2.6 file format.
On the incremental timer, I can make the connection to the Oracle database but adding records is tripping me up. I was hoping I could do something like:
APPEND FROM <fpw2.6_TableName> WHERE recno(fpw2.6_TableName) > N
where N is the number of records in the Oracle table (which I still haven't figured out how to determine the record count). This way, we are just appending newly added records. However, the APPEND FROM doesn't work. I really don't want to have to do INSERTs with the field names because putting together the list of fields and values will take forever. I've got 57 tables to update (some with only 2-3 fields, others with 35-40) and having to put each field name in for each table will be very labor-intensive.
Is there a method to append a block of records from a FoxPro table to an Oracle table using the SQLExec function?
Thanks in advance for any and all help.
PS. If someone knows how, using the SQLExecute function, to get the number of records in the Oracle table (I tried CALCULATE cnt() with no luck) I'd really appreciate it.