Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Query over local and remote tables
Wed, Aug 29 2007 9:41 AMPermanent Link

Tom De Bozz
I have 2 sessions (2databases) (1 local, 1 remote)

I want to run a query that uses a table from the local session and a table from the remote session from which a report is generated.

What is the best way todo this?

(local session table will contain different data for each workstation - it contains data imported from a text file to compare against a master orders table on the 'shared' remote session table)

Regards

Tom
Wed, Aug 29 2007 4:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tom,

<< I have 2 sessions (2databases) (1 local, 1 remote)

I want to run a query that uses a table from the local session and a table
from the remote session from which a report is generated.

What is the best way todo this? >>

You must first either move the remote table to the local workstation, or the
local table to the remote server, in order to query both at the same time.

You can do so via the TDBISAMTable LoadFromStream/SaveToStream methods for
tables that aren't really big:

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

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Aug 30 2007 7:26 AMPermanent Link

Tom
Thanks Tim

I thought it was somehting like that oe memory tables.
Luckily the local table is not large so I will stream that to the server and perform the query there.

Regards.
Thu, Aug 30 2007 7:30 AMPermanent Link

Tom
Just thinking ahead....

Will the stream create a unique table for each user? As 2 or more users could be doing this process at the same time with different data from the local table?

Regards
Thu, Aug 30 2007 5:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tom,

<< Will the stream create a unique table for each user? As 2 or more users
could be doing this process at the same time with different data from the
local table? >>

You'll have to create the remote table manually (LoadFromStream does not
create the table), so if you want a unique table (and the size is fairly
small), then just create an in-memory remote table in the special "Memory"
database to use.  In-memory tables are separated according to the client
process, so they are automatically unique for each remote process accessing
the database server.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image