Thread View: borland.public.interbase.sql
5 messages
5 total messages
Started by D.v.Witzleben
Fri, 06 Dec 2002 16:46
copy tables between databases
Author: D.v.Witzleben
Date: Fri, 06 Dec 2002 16:46
Date: Fri, 06 Dec 2002 16:46
34 lines
2217 bytes
2217 bytes
Hi I build the following application: CENTRAL-APP: They are able to Insert/Modify (not delete) Item-Data (table ITEM). Then this data has to be send to the shops via 64K Modem. SHOPS-APP: They receive ITEM-Table with new items, sell products into the SOLD-Table, and are only able to read the ITEM-table. I figured following solutions: 1: Replication on record-basis for table ITEM through delphi / IBX, works fine. PROBLEM: It takes 3-5 hours a day. Also the destination DB grows extremely in size. 2: Export table ITEM with Delphi/BDE/Batchmove into ITEM.DBF, import into SHOP-APP the same way. PROBLEM: The destination DB grows extremely in size, when you close it, it seems to hang, after a while it does close. 3: "Create table itemexternal external file ITEMEXTERNAL.TXT" in Interbase, insert data with insert into itemexternal select * from item. In the SHOPS-APP there is no internal ITEM-table, I use the external ITEMEXTERNAL-table directly for read-purposes. Works very fine. PROBLEM: No BLOB-DATA! Also I can't copy the file while someone is working on the DB, since it's locked. Question: Any idea on problem 1-3? Thanks, Dietrich
Re: copy tables between databases
Author: CleverComponents Team
Date: Sat, 07 Dec 2002 01:29
Date: Sat, 07 Dec 2002 01:29
64 lines
2916 bytes
2916 bytes
Hello Dietrich, What about solution #4 - use TIBSQL and BatchInput, BatchOutput, InputRawFile,OutputRawFile features? The fastest and the easyest way so far. Steps: 1) Create OutputRawFile with TIBSQL.BatchOutput 2) zip it and send (you can use ZLib) 3) unzip it on a client a client side into InputRawFile 4) Start transaction, empty your table, load data from InputRawFile using TIBSQL.BatchInput and Commit Whole code size will be about 100 lines max. Best regards, CleverComponents Team www.CleverComponents.com info@CleverComponents.com "D.v.Witzleben" <info@witzleben-edv.de> wrote in message news:3df0d44d@newsgroups.borland.com... > Hi > > I build the following application: > > CENTRAL-APP: They are able to Insert/Modify (not delete) Item-Data (table > ITEM). Then this data has to be send to the shops via 64K Modem. > > SHOPS-APP: They receive ITEM-Table with new items, sell products into the > SOLD-Table, and are only able to read the ITEM-table. > > I figured following solutions: > > 1: Replication on record-basis for table ITEM through delphi / IBX, works > fine. > PROBLEM: It takes 3-5 hours a day. Also the destination DB grows > extremely in size. > > 2: Export table ITEM with Delphi/BDE/Batchmove into ITEM.DBF, import into > SHOP-APP the same way. > PROBLEM: The destination DB grows extremely in size, when you close it, it > seems to hang, after a while it does close. > > 3: "Create table itemexternal external file ITEMEXTERNAL.TXT" in Interbase, > insert data with insert into itemexternal select * from item. In the > SHOPS-APP there is no internal ITEM-table, I use the external > ITEMEXTERNAL-table directly for read-purposes. Works very fine. > PROBLEM: No BLOB-DATA! Also I can't copy the file while someone is working > on the DB, since it's locked. > > Question: Any idea on problem 1-3? > > Thanks, > > Dietrich > >
Re: copy tables between databases
Author: D.v.Witzleben
Date: Sun, 08 Dec 2002 21:39
Date: Sun, 08 Dec 2002 21:39
84 lines
3644 bytes
3644 bytes
Hi, Didn't know about this feature, seems to be very clever. I'll try it and let you know! By the way, My APP is really neat, on the client side I use serial-Terminals as cash-registers (www.orderman.com) . For anyone who needs to build simple stable app's for shops its a cool solution. Dietrich "CleverComponents Team" <info@clevercomponents.com> schrieb im Newsbeitrag news:3df14ea9$1@newsgroups.borland.com... > > Hello Dietrich, > > What about solution #4 - use TIBSQL and BatchInput, BatchOutput, > InputRawFile,OutputRawFile features? > > The fastest and the easyest way so far. > > Steps: > 1) Create OutputRawFile with TIBSQL.BatchOutput > 2) zip it and send (you can use ZLib) > 3) unzip it on a client a client side into InputRawFile > 4) Start transaction, empty your table, load data from InputRawFile using > TIBSQL.BatchInput and Commit > > Whole code size will be about 100 lines max. > > Best regards, > > CleverComponents Team > www.CleverComponents.com > info@CleverComponents.com > > "D.v.Witzleben" <info@witzleben-edv.de> wrote in message > news:3df0d44d@newsgroups.borland.com... > > Hi > > > > I build the following application: > > > > CENTRAL-APP: They are able to Insert/Modify (not delete) Item-Data (table > > ITEM). Then this data has to be send to the shops via 64K Modem. > > > > SHOPS-APP: They receive ITEM-Table with new items, sell products into the > > SOLD-Table, and are only able to read the ITEM-table. > > > > I figured following solutions: > > > > 1: Replication on record-basis for table ITEM through delphi / IBX, works > > fine. > > PROBLEM: It takes 3-5 hours a day. Also the destination DB grows > > extremely in size. > > > > 2: Export table ITEM with Delphi/BDE/Batchmove into ITEM.DBF, import into > > SHOP-APP the same way. > > PROBLEM: The destination DB grows extremely in size, when you close it, > it > > seems to hang, after a while it does close. > > > > 3: "Create table itemexternal external file ITEMEXTERNAL.TXT" in > Interbase, > > insert data with insert into itemexternal select * from item. In the > > SHOPS-APP there is no internal ITEM-table, I use the external > > ITEMEXTERNAL-table directly for read-purposes. Works very fine. > > PROBLEM: No BLOB-DATA! Also I can't copy the file while someone is > working > > on the DB, since it's locked. > > > > Question: Any idea on problem 1-3? > > > > Thanks, > > > > Dietrich > > > > > >
Re: copy tables between databases
Author: Dietrich v. Witzleben
Date: Wed, 11 Dec 2002 13:16
Date: Wed, 11 Dec 2002 13:16
87 lines
3524 bytes
3524 bytes
Hi, I have tested your solution #4, but it does not support BLOBS !? Message "BLOB NOT FOUND" Also the database keeps growing with every delete / Insert Any suggestions? Dietrich "CleverComponents Team" <info@clevercomponents.com> schrieb im Newsbeitrag news:3df14ea9$1@newsgroups.borland.com... > > Hello Dietrich, > > What about solution #4 - use TIBSQL and BatchInput, BatchOutput, > InputRawFile,OutputRawFile features? > > The fastest and the easyest way so far. > > Steps: > 1) Create OutputRawFile with TIBSQL.BatchOutput > 2) zip it and send (you can use ZLib) > 3) unzip it on a client a client side into InputRawFile > 4) Start transaction, empty your table, load data from InputRawFile using > TIBSQL.BatchInput and Commit > > Whole code size will be about 100 lines max. > > Best regards, > > CleverComponents Team > www.CleverComponents.com > info@CleverComponents.com > > "D.v.Witzleben" <info@witzleben-edv.de> wrote in message > news:3df0d44d@newsgroups.borland.com... > > Hi > > > > I build the following application: > > > > CENTRAL-APP: They are able to Insert/Modify (not delete) Item-Data (table > > ITEM). Then this data has to be send to the shops via 64K Modem. > > > > SHOPS-APP: They receive ITEM-Table with new items, sell products into the > > SOLD-Table, and are only able to read the ITEM-table. > > > > I figured following solutions: > > > > 1: Replication on record-basis for table ITEM through delphi / IBX, works > > fine. > > PROBLEM: It takes 3-5 hours a day. Also the destination DB grows > > extremely in size. > > > > 2: Export table ITEM with Delphi/BDE/Batchmove into ITEM.DBF, import into > > SHOP-APP the same way. > > PROBLEM: The destination DB grows extremely in size, when you close it, > it > > seems to hang, after a while it does close. > > > > 3: "Create table itemexternal external file ITEMEXTERNAL.TXT" in > Interbase, > > insert data with insert into itemexternal select * from item. In the > > SHOPS-APP there is no internal ITEM-table, I use the external > > ITEMEXTERNAL-table directly for read-purposes. Works very fine. > > PROBLEM: No BLOB-DATA! Also I can't copy the file while someone is > working > > on the DB, since it's locked. > > > > Question: Any idea on problem 1-3? > > > > Thanks, > > > > Dietrich > > > > > >
Re: copy tables between databases
Author: CleverComponents Team
Date: Wed, 11 Dec 2002 19:10
Date: Wed, 11 Dec 2002 19:10
31 lines
2373 bytes
2373 bytes
Hello Dietrich, > I have tested your solution #4, but it does not support BLOBS !? > Message "BLOB NOT FOUND" Please see function TIBOutputRawFile.WriteColumns: Boolean; located IBSQL.pas - as you see it can hanlde BLOBs. If you have problems with it you might want to post your qestions to borland.public.delphi.database.interbaseexpress Just check that you have latest version of IBX. > Also the database keeps growing with every delete / Insert Unfortunately it is not clear what you meant by this. Database will grow of course but it will really depends how you insert / delete data. I can not explain all details in this small message (please refer to Interbase documentation) but if you start transaction, delete data and insert new data into the same table then database will grow. Once you commited transaction (and reconnected to the database) then next insert will use space left after deleted records. So database will not grow all the time unless you will insert more and more data with every session of delete/update Generally speaking you should not worry about database size. If size matters then you probably need seek other solution . Best regards, Alex CleverComponents Team www.CleverComponents.com info@CleverComponents.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads