SELECT command for the connection.INSERT command for bulk insert.
{
TSQLStandardDBProtocolSQLNet15 sqlNet;
TSQLStandardDataStoreOracle7 oracle7;
TSQLStandardConnectionHandle dbc(sqlNet, oracle7);
dbc.LogonStep(1, TSQLLogonStep(
TStandardText("t:129.213.80.90:SAMP"),
TStandardText("auser"), TStandardText("apassword")));
TSQLCommandHandle selectCmd
= dbc.CreateSQLCommand(TStandardText(
"SELECT EMPNO, PROJECTNAME FROM Project")));
selectCmd.Execute();
TRecordSourceHandle recSrc
= selectCmd.GetRecordSource();
dbc.LogonStep(1, TSQLLogonStep(TStandardText("other_server"),
TStandardText("otheruser"), TStandardText("otherpassword")));
TSQLCommandHandle insertCmd =
dbc.CreateSQLCommand(TStandardText(
"INSERT INTO Project VALUES(?,?)"));
insertCmd.Execute(recSrc);
}