ODBC copy between databases
Posted: Tue 09 Aug 2011 17:48
I need to copy records from tables in a database to another database with identical structure and table names and login parameters using ODBC for SYBASE 5.
I have 2 UniConnection, 2 ODBC Providers and 2 UniTable components on a form.
I set the UniConnection->Provider to ODBC on both connection components. Table1->Connection=UniConnection1 and Table2->Connection2=UniConnection2.
I use the code: UniConnection->Server = ODBC ALIAS name
with different names for the 2 components but when I use the code
UniConnection1->Server=aliasname1
UniConnection1->Connected=true
Table1->Open
UniConnection2->Server=aliasname2
UniConnection2->Connected=true
Table2->Open
The second connection is made to the first database and table instead of to the second.
If I delete one of the ODBC Provider components the same thing happens.
If I select a different database for the first one the same thing happens.
What am I doing wrong ?
I have 2 UniConnection, 2 ODBC Providers and 2 UniTable components on a form.
I set the UniConnection->Provider to ODBC on both connection components. Table1->Connection=UniConnection1 and Table2->Connection2=UniConnection2.
I use the code: UniConnection->Server = ODBC ALIAS name
with different names for the 2 components but when I use the code
UniConnection1->Server=aliasname1
UniConnection1->Connected=true
Table1->Open
UniConnection2->Server=aliasname2
UniConnection2->Connected=true
Table2->Open
The second connection is made to the first database and table instead of to the second.
If I delete one of the ODBC Provider components the same thing happens.
If I select a different database for the first one the same thing happens.
What am I doing wrong ?