Article View: borland.public.cppbuilder.database.multi-tier
Article #1689Re: How to insert data to table on server
From: John Graham
Date: Sun, 01 Aug 1999 00:00
Date: Sun, 01 Aug 1999 00:00
58 lines
2999 bytes
2999 bytes
Siaprj, I assume from the your description that your application is not multitier, but two tier where you have a TTable object in your client data module that connects directly to the server data table. First, you might have been better off putting this question to the folks in the borland.public.cppbuilder.database forum rather than this one which is devoted to multitier applications. Second, there are many ways to copy data from the table on your server to your local data table. The easiest way to move data is to use a TBatchmove object. When you set the Active property of your TTable object to true, all of the data in your server table is available - not the most memory efficient thing to do especially if the table is large. If you are looking to move only data that meets certain requirements, you can set the Filter property of your TTable to the conditions that you want your data to meet. When you set the Filtered property to true, the filter is activated and only data that meets your conditions is visible. You can then use the TBatchmove object to move that data to your local table. You could do this more efficiently by using a TQuery object instead of a TTable object to connect to your server table. Of course, you will have to supply the query object with an SQL statement and a list of parameters, but it's a good idea to have a working knowledge of SQL anyway. The SQL Wizard, available by right clicking your mouse with the TQuery object selected, isn't difficult to use. Because the TQuery object is a dataset just as is the TTable object, you can use the batch move object with it as well. Since you don't state in your question why you need to have a local table as well as the server table available, the above should work. But duplicating data gets bothersome, so if you really don't need to do it, don't. Regards, John siaprj wrote: > i am trying to build a client server application right now... > and i have a problem. > i have two table that have same structur... > one in my server computer...the other in my client komputer... > the question is... > how can i append data to my table in server computer with data from the > table in my clien computer... > > i hope somebody can give some advice..i realy need that... > > thanks for all of you... > and i'm sorry about my english... > thanks again > siaprj
Technical Details
Message-ID:
<37A42100.C3CBA2D4@salts.navy.mil>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37A31CB8.7912017D@student.te.ugm.ac.id>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,51722f4b56677326 X-Google-Attributes: gidfcd2b,public From: John Graham <jgraham@salts.navy.mil> Subject: Re: How to insert data to table on server Date: 1999/08/01 Message-ID: <37A42100.C3CBA2D4@salts.navy.mil> X-Deja-AN: 507568571 Content-Transfer-Encoding: 7bit References: <37A31CB8.7912017D@student.te.ugm.ac.id> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: U. S. Navy SALTS Project Mime-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier