Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
SELECT INTO & .IDX |
Fri, Feb 19 2010 5:33 AM | Permanent Link |
Eeman Khan | sTableName := C:\Temp\Data\Transactions
Q.SQL.Add('SELECT * INTO "'+sTableName+'"'); Q.SQL.Add('FROM "Transactions"'); Q.ExecSQL; did not copy index into new table, before Encryption i copy *.idx files using Win95Copy(Self.Handle, DatabasePath+'\*.idx', ePath.Text, False, False); and after that i repair the database was worked fine, but now Not valid table msg. appear. how to export index too. waiting for the reply, regards, Eeman Khan |
Fri, Feb 19 2010 7:39 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Eeman
>but now Not valid table msg. appear. >how to export index too. >waiting for the reply, Basically you can't. You need to create the indices one the table has been created. The only other thought I have is to use a table rather than a query and use the CopyTable statement which I think does copy the indices. Roy Lambert [Team Elevate] |
Fri, Feb 19 2010 8:08 AM | Permanent Link |
"Robert" | "Eeman Khan" <e4eeman@hotmail.com> wrote in message news:2D86CE00-7D68-4C91-843E-F4B64A141A3C@news.elevatesoft.com... > sTableName := C:\Temp\Data\Transactions > > Q.SQL.Add('SELECT * INTO "'+sTableName+'"'); > Q.SQL.Add('FROM "Transactions"'); > Q.ExecSQL; > > did not copy index into new table, before Encryption i copy *.idx files > using > > Win95Copy(Self.Handle, DatabasePath+'\*.idx', ePath.Text, False, False); > > and after that i repair the database was worked fine, > > but now Not valid table msg. appear. > how to export index too. > waiting for the reply, > > Several ways to do this. The simplest would be to add CREATE INDEX statements to your SQL. Or you could have a table already created, do an empty table on sql, then insert the selects instead of using select into. Depends on your situation. But select into builds a brand new table, which is not necessarily a copy of the old table - in fact obviously a select can bring in data from a combination of tables via joins, so the idea of "copying the index" makes no sense. Robert |
Fri, Feb 19 2010 4:25 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Eeman,
Roy is correct - if you want a copy of the table, use the TDBISAMTable.CopyTable method. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |