Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Send records from one session and database to other session and database
Sat, Jul 1 2006 3:37 PMPermanent Link

"Gerardo Agraz"
Hello, I have 2 remote servers, with the same databases and structures, I
need send some records of server1\Table1 to server2\Table1 is this posible ?

maybe with Select Into, but I dont find in the manual one parameter to
server or database.

Thanks.

Gerardo.



Sat, Jul 1 2006 6:21 PMPermanent Link

"Ralf Mimoun"
Gerardo Agraz wrote:
> Hello, I have 2 remote servers, with the same databases and
> structures, I need send some records of server1\Table1 to
> server2\Table1 is this posible ?

Not with SQL, you have to write code. If the table structure is really
identical, something like a simple "while not EOF" going through a SELECT
from db1 and firing a "INSERT INTO xxx VALUES(...)" to db2 should do the
job. You can fill the VALUES part easily just by going through the fields
from the SELECT statement. Or even more easily: use tables and something
like TableFromDB2.Fields[i].Value :=  TableFromDB1.Fields[i].Value.

Ralf
Mon, Jul 3 2006 3:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gerardo,

<< Hello, I have 2 remote servers, with the same databases and structures, I
need send some records of server1\Table1 to server2\Table1 is this posible ?
>>

How many records do you need to send ?  If it isn't that many, you can use
the SaveToStream/LoadFromStream methods to do so:

http://www.elevatesoft.com/dbisam4d5_loading_saving_streams.htm

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jul 3 2006 7:08 PMPermanent Link

"Gerardo Agraz"
Hello Tim thanks for your help, just one more question, Can I use the Load &
Saving Stream just with a part o the table, like a filter or a where
condition ?

Or maybe can I use the Load & Saving in a Query Results ?

I need move just some records not all the table.

Thanks Again.

Gerardo


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> escribió en el
mensaje news:EF356B20-8497-4321-BBDD-5F102ED6B3E0@news.elevatesoft.com...
> Gerardo,
>
> << Hello, I have 2 remote servers, with the same databases and structures,
> I need send some records of server1\Table1 to server2\Table1 is this
> posible ?
> >>
>
> How many records do you need to send ?  If it isn't that many, you can use
> the SaveToStream/LoadFromStream methods to do so:
>
> http://www.elevatesoft.com/dbisam4d5_loading_saving_streams.htm
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>
>


Wed, Jul 5 2006 1:37 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gerardo,

<< Hello Tim thanks for your help, just one more question, Can I use the
Load & Saving Stream just with a part o the table, like a filter or a where
condition ? >>

Absolutely.  SaveToStream respects any current ranges or filters (or query
WHERE clauses), so only the viewable records are added to the stream.

<< Or maybe can I use the Load & Saving in a Query Results ? >>

Sure, that will work.  Just remember that you only need to use a simple
TDBISAMTable for the Load portion of the process since the records in the
stream only reflect those that you want to load anyways.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image