Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
How to use MyTable.AppendRecord |
Mon, Apr 9 2012 9:30 AM | Permanent Link |
Robert Rowlands | Hi.
I'm struggling with this method. I have a memory table containing a few thousand contacts. If another user adds a contact to the original table on the Server I need to load that record into memory if it is needed for a project. I have a query to load the record from the Server. I now want to copy the fields from the query to the memory table and AppendRecord seems to way to do this. What is an array of TVarRec and how do I get the record in the query into this format? Thanks. |
Mon, Apr 9 2012 10:09 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Robert
AppendRecord & TVarRec are things I don't recognise, but if you have a query to extract the contact why not just use simple table methods? inmemtable.insert; inmentable.fieldbyname('contact').asstring := query.fieldbyname('contact').asstring; .... .... inmemtable.post; query.close; Roy Lambert [Team Elevate] |
Mon, Apr 9 2012 11:25 AM | Permanent Link |
Raul Team Elevate | > What is an array of TVarRec and how do I get the record in the query
into this format? Appendrecord has to be able to accommodate variety of datatypes hence it uses open array as input (the other common use for this is Format statement). Internally delphi uses TVarRec for this but from your perspective you should be able to do something like this ssume first 2 fields are int and 3rd is string) mytable.AppendRec( [1,2,'abc'] ); Raul |
Mon, Apr 9 2012 1:37 PM | Permanent Link |
Robert Rowlands | Roy.
I was trying to do something similar to that suggested by Raul but did not have the square brackets. I've coded it as you suggested. Thanks. |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |