Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Borrow table structure

Status
Not open for further replies.

JoeNg

Programmer
Apr 17, 2001
174
US
Can I create a table by borrowing the table structure from another table?

Thanks

Joe
 
Try posting on a different forum: e.g.

Microsoft: SQL Server
or
ANSI SQL
 
Hi Joe

Just an example

Table1.Active:=true;
Table1.FieldDefs.Update;
Table1.IndexDefs.Update;

Table2.TableName:='Table.db';
Table2.DatabaseName:='c:\Folder';
Table2.FieldDefs.Assign(Table1.FieldDefs);
Table2.IndexDefs.Assign(Table1.IndexDefs);

Table2.CreateTable;
 
Hi, BTecho

I suspected it has to do with fieldDefs, just not sure the syntax.

Thank you!


Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top