Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 6 of 6 total |
Borrow table structure |
Fri, Jul 28 2006 9:47 PM | Permanent Link |
Aldo Caruso | Hello,
Is there a simple way to create a brand new table copying its structure completely from another one ? I'm using DBISam 4.21 Build 7 Thanks in advance. Aldo |
Fri, Jul 28 2006 9:57 PM | Permanent Link |
Herb (Kraft) | Aldo Caruso <caruso@gia-sa.com> wrote:
Hello, Is there a simple way to create a brand new table copying its structure completely from another one ? I'm using DBISam 4.21 Build 7 Thanks in advance. Aldo ----------------------------------------------- Yes- use DB SYS util which is free from Elevate. It is located on this site: http://www.elevatesoft.com/scripts/download.dll?action=downinfo&producttype=add&version=4 Look at the bottom left, Borrow Or, you can reverse engineer the table (also DB Sys util) into Pascal code or SQL and then create a table programatically. Herb |
Fri, Jul 28 2006 10:29 PM | Permanent Link |
Aldo Caruso | Herb,
Thanks, but I meant borrowing by code: A function or method where a table could be created borrowing its structure from another one. Aldo |
Fri, Jul 28 2006 10:38 PM | Permanent Link |
"Johnnie Norsworthy" | "Aldo Caruso" <caruso@gia-sa.com> wrote in message
news:4BC0C6DB-B7DA-4F3B-BEC1-416B57254C5A@news.elevatesoft.com... > Herb, > > Thanks, but I meant borrowing by code: A function or method where a > table could be created borrowing its structure from another one. OldTable.Open; NewTable.FieldDefs.Assign(OldTable.FieldDefs); NewTable.IndexDefs.Assign(OldTable.IndexDefs); OldTable.Close; NewTable.CreateTable; -Johnnie |
Fri, Jul 28 2006 10:42 PM | Permanent Link |
Aldo Caruso | Thanks.
|
Sat, Jul 29 2006 11:47 AM | Permanent Link |
Aldo Caruso | Johnnie,
I implemented your code and it works fine. Neverthless, for the sake of completness, here is the code that makes an exact copy of the original table structure. with SourceTable do begin Open; FieldDefs.Update; IndexDefs.Update; DestTable.FieldDefs.Assign(FieldDefs); DestTable.IndexDefs.Assign(IndexDefs); DestTable.CreateTable(LocaleId,UserMajorVersion,UserMinorVersion,Encrypted, Password,Description,IndexPageSize,BlobBlockSize,LastAutoincValue, TextIndexFields,TextIndexStopWords,TextIndexSpaceChars, TextIndexIncludeChars); Close; end Again, thank you very much for your support. Aldo |
This web page was last updated on Thursday, May 23, 2024 at 07:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |