I have perused this forum and other web references and found what should be the answer, but it is not working for some reason.
The general answer that I found went something like the following:
I have a very simple VFP data table (sdexclude):
With that in mind, I would expect the following should work.
I need to do these INSERTS from a Non-VFP application via a Connection by using VFP SQL Syntax to insert multiple records into that VFP table.
But before going to the Non-VFP application I wanted to confirm the VFP SQL syntax would work.
In order to test the VFP SQL syntax itself I tested in the VFP Command window and each individual 'record' above will successfully insert on its own just fine.
But when I attempt (in the VFP Command window) to string the 2 records together (like shown above), I get an error message:
I am guessing that the problem is something simple that I am over-looking.
Any assistance/suggestions you might have to offer would be greatly appreciated.
Thanks,
JRB-Bldr
The general answer that I found went something like the following:
INSERT INTO table (field1, field2, ..., fieldn) VALUES
(valuea1, valuea2, ..., valuean),
(valueb1, valueb2, ..., valuebn),
...
(valuez1, valuez2, ..., valuezn)
Simple enough, but for some reason, I am having difficulty getting that to work.(valuea1, valuea2, ..., valuean),
(valueb1, valueb2, ..., valuebn),
...
(valuez1, valuez2, ..., valuezn)
I have a very simple VFP data table (sdexclude):
locationid C(3)
date D
With that in mind, I would expect the following should work.
INSERT INTO sdexclude (locationid,date) VALUES ('1',CTOD('1/1/2015')), ('2',CTOD('1/2/2015'))
I need to do these INSERTS from a Non-VFP application via a Connection by using VFP SQL Syntax to insert multiple records into that VFP table.
But before going to the Non-VFP application I wanted to confirm the VFP SQL syntax would work.
In order to test the VFP SQL syntax itself I tested in the VFP Command window and each individual 'record' above will successfully insert on its own just fine.
But when I attempt (in the VFP Command window) to string the 2 records together (like shown above), I get an error message:
Command contains unrecognized phrase/keyword
I am guessing that the problem is something simple that I am over-looking.
Any assistance/suggestions you might have to offer would be greatly appreciated.
Thanks,
JRB-Bldr