Hi,
I know this is probably a bit too late, but since there haven't been any responses, I might as well give this a shot. I may be wrong regarding this, but shouldn't that code looks something like:
VAImpTable.Open;
VAImpTable.First;
VAImpTable.FetchAll;
VAImpTable.First;
spBatchInsert.ParamByName('@input_table').DataType := ftDataSet;
spBatchInsert.ParamByName('@input_table').Direction := pdInput;
spBatchInsert.ParamByName('@input_table').Value := VAImpTable;
try
spBatchInsert.ExecProc;
except on e: Exception do
ShowMessage(e.Message);
end;
VAImpTable.Close;
I know the "
AsDataSet" is short-hand, but personally I prefer setting certain properties, especially things like data source parameter inputs, explicitly.
Having said that though, I had issues many moons ago converting the data source of an application from one provider to another. I just ended up writing a generic class that would physically move the data from the one to the other.
At that stage, it proved to be much more reliable, because I could then write descendant classes which would then be specific to certain types of (provider) database types as some (field) definitions didn't port properly between the two.
Hope that helps,
Glen