Board index » delphi » insert / select from Problem

insert / select from Problem

Hi

I have an application where we are trying to insert the records of one table
into another (Both structures the same) where the two tables belong to two
differing databases (That is the tables are tha same types Paradox or MSSQL)
but have differing aliases.

Is there a way to do this?

Thanks in advance

Richard Moore

PS Please e-mail reply to r...@megasea.com.au

 

Re:insert / select from Problem


A TBatchMove has source and destination properties which can be in
different databases.  What is the problem?

--Bill Sparrow--

Re:insert / select from Problem


Use the TBatchMove component.

--
Bill Todd (TeamB)
(Questions received via email cannot be answered.)

Re:insert / select from Problem


Sorry Bill & Bill, I did not explain my self correctly.

The insert records from ":Alias1:Table1" into ":Alais2:Table2" is actually
part of an SQL query ie

INSERT INTO ":Alias2:Table2" SELECT * FROM ":Alias1:Table1" WHERE
......(Some condition for Table1)

We have tried heterogeneous setup where the queries databasename property is
set to a third alias pointing to a local drive but this did not work, as
when we "ran" the prepare statement we got an error associated with the
third alias not be connected to a database.
We are using Delphi 3 and BDE 5.01.

Any ideas?

Thanks in advance

Richard Moore

"Bill Todd (TeamB)" <b...@dbginc.com> wrote in message
news:8j89a1$44n12@bornews.borland.com...

Quote
> Use the TBatchMove component.

> --
> Bill Todd (TeamB)
> (Questions received via email cannot be answered.)

Re:insert / select from Problem


You may have to batch more the result set of the SELECT  to a work table in
the other database the insert from the work table.

--
Bill Todd (TeamB)
(Questions received via email cannot be answered.)

Other Threads