Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 11 to 18 of 18 total |
Remote batch append |
Fri, Aug 24 2007 5:15 PM | Permanent Link |
"Jeff Cook" | Glynn Owen wrote:
.. .. .. > > I can't say for sure, but it seems unlikely to me, since the > "littletable" doesn't exist within the context of the "bigtable". I > have seen SQL that allows for qualifiers to table tokens, but I don't > know if DBISAM can do that. > > Also, what do you mean by a "memory table"? Are you referring to a > TClientDataset, or something else? > > Thanks, > Glynn Glynn Memory tables are a feature of DBISAM - if you aren't using them, you are missing out on heaps of SQL functionality. They are held in memory and if they get too big they get paged out and in and can certainly be used in SELECT's and JOIN's. Cheers Jeff -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz + Joan and Jeff Cook The Cooks Oasis www.cookislandsoasis.com |
Fri, Aug 24 2007 6:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | David,
<< I would use remoteprocedures, saving the local table into a clientdataset, then saving the dataset into a memorystrean, then send the memorystream as a blob parameter whencalling the remoteprocedure, then the remote procedure should load a clientdataset from the stream and then add all the clientdataset into the target table. >> Excellent idea. However, one can cut out the TClientDataSet completely - just use the TDBISAMParam.Assign method to assign the table instance to the remote procedure parameter: with MyRemoteSession do begin with RemoteParams.CreateParam(ftBlob,'LocalTable') do Assign(MyLocalTable); CallRemoteProcedure('TransferTable'); end; On the other end, you can also just use: MyServerTable.Assign(RemoteProcedureParam) to transfer the parameter contents back into the server table. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Aug 24 2007 6:43 PM | Permanent Link |
"Glynn Owen" | Jeff Cook wrote:
> Glynn Owen wrote: > . > . > . > > > > I can't say for sure, but it seems unlikely to me, since the > > "littletable" doesn't exist within the context of the "bigtable". I > > have seen SQL that allows for qualifiers to table tokens, but I > > don't know if DBISAM can do that. > > > > Also, what do you mean by a "memory table"? Are you referring to a > > TClientDataset, or something else? > > > > Thanks, > > Glynn > > Glynn > > Memory tables are a feature of DBISAM - if you aren't using them, you > are missing out on heaps of SQL functionality. They are held in > memory and if they get too big they get paged out and in and can > certainly be used in SELECT's and JOIN's. > > Cheers > > Jeff You are quite right. However, I can't find any mention of memory tables in the help file for DBISAM that I downloaded. Thanks anyway, Glynn -- |
Fri, Aug 24 2007 6:53 PM | Permanent Link |
David Cardenas | WOW!! This is so neat, i would never tought that this method will stream the entire table,
the structure of the tables have to be the same, i presume. >Excellent idea. However, one can cut out the TClientDataSet completely - >just use the TDBISAMParam.Assign method to assign the table instance to the >remote procedure parameter: > >with MyRemoteSession do > begin > with RemoteParams.CreateParam(ftBlob,'LocalTable') do > Assign(MyLocalTable); > CallRemoteProcedure('TransferTable'); > end; > >On the other end, you can also just use: > >MyServerTable.Assign(RemoteProcedureParam) > >to transfer the parameter contents back into the server table. > >-- >Tim Young >Elevate Software >www.elevatesoft.com |
Sat, Aug 25 2007 5:48 PM | Permanent Link |
"Rob Frye" | Hi Glynn
The LoadFromStream method appends records (ie. it doesn't destroy existing records) so you may only need to do the following - LocalTable.SaveToStream(AMemoryStream); RemoteTable.LoadFromStream(AMemoryStream); Note: This requires that the field structures are the same for both tables and that all the fields in the local table are to be written to the remote table as is. Rob "Glynn Owen" <glynnMowenREMOVE@hotmail.comDELETE> wrote in message news:37214B55-32E8-4CB6-A17F-CF91715F3515@news.elevatesoft.com... >I want to create a small table on a local system that contains new > records for a much larger table on a remote system. What I'm thinking > of doing is just to open both tables at the same time, and then append > the new records of the local table into the remote table. > > This seems feasible, but clumsy. There will be some thousands (1 or 2) > of records transferred each time, so I need something that is fast. Any > recommendations for a more elegant solution? > > TIA, > Glynn > > -- > |
Sat, Aug 25 2007 8:47 PM | Permanent Link |
"Glynn Owen" | Rob Frye wrote:
> Hi Glynn > > The LoadFromStream method appends records (ie. it doesn't destroy > existing records) so you may only need to do the following - > > LocalTable.SaveToStream(AMemoryStream); > RemoteTable.LoadFromStream(AMemoryStream); > > Note: This requires that the field structures are the same for both > tables and that all the fields in the local table are to be written > to the remote table as is. > > Rob > > "Glynn Owen" <glynnMowenREMOVE@hotmail.comDELETE> wrote in message > news:37214B55-32E8-4CB6-A17F-CF91715F3515@news.elevatesoft.com... > > I want to create a small table on a local system that contains new > > records for a much larger table on a remote system. What I'm > > thinking of doing is just to open both tables at the same time, and > > then append the new records of the local table into the remote > > table. > > > > This seems feasible, but clumsy. There will be some thousands (1 or > > 2) of records transferred each time, so I need something that is > > fast. Any recommendations for a more elegant solution? > > > > TIA, > > Glynn > > > > -- Now *that* is elegant. Thanks. I'll let you know how it works, but it looks like exactly what I was hoping for. Thanks for the thought - Glynn -- |
Sat, Aug 25 2007 9:17 PM | Permanent Link |
"Glynn Owen" | Rob Frye wrote:
> Hi Glynn > > The LoadFromStream method appends records (ie. it doesn't destroy > existing records) so you may only need to do the following - > > LocalTable.SaveToStream(AMemoryStream); > RemoteTable.LoadFromStream(AMemoryStream); > > Note: This requires that the field structures are the same for both > tables and that all the fields in the local table are to be written > to the remote table as is. > > Rob > > "Glynn Owen" <glynnMowenREMOVE@hotmail.comDELETE> wrote in message > news:37214B55-32E8-4CB6-A17F-CF91715F3515@news.elevatesoft.com... > > I want to create a small table on a local system that contains new > > records for a much larger table on a remote system. What I'm > > thinking of doing is just to open both tables at the same time, and > > then append the new records of the local table into the remote > > table. > > > > This seems feasible, but clumsy. There will be some thousands (1 or > > 2) of records transferred each time, so I need something that is > > fast. Any recommendations for a more elegant solution? > > > > TIA, > > Glynn > > > > -- I just tried out your idea, and it works like a charm. I will be so glad to replace all the code I wrote previously to make use of Indy with - begin ms := TMemoryStream.Create; TRY tblSrc.SaveToStream(MS); tblDst.LoadFromStream(MS); FINALLY ms.Free; END end; DBISAM ROCKS! Glynn -- |
Mon, Aug 27 2007 5:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | David,
<< WOW!! This is so neat, i would never tought that this method will stream the entire table, the structure of the tables have to be the same, i presume. >> With V4, the table structures don't have to be the same, but the fields that do exist in the stream (by name) must also exist in the target table. DBISAM will convert them to the proper data type as necessary also. The process is very similar to a text import. -- Tim Young Elevate Software www.elevatesoft.com |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Friday, April 26, 2024 at 06:09 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |