I noticed that when I use your driver to create the tables, the files that are created are: .cgp, .dbf & .idx, but our existing database has .dbf & .cdx files.
I've read at: http://msdn.microsoft.com/en-us/library/xb5dh76z(v=vs.80).aspx
that:
"For a given table, Visual FoxPro stores primary and candidate indexes in the structural .cdx file associated with the table (.dbf) file. You cannot store primary and candidate indexes in other .cdx files, such as nonstructural .cdx files, nor is it possible to use standalone index (.idx) files for primary and candidate indexes because the index file should always open whenever the associated table is opened."
I believe this may be the reason that I'm struggling with writing to our existing tables.
|
>but our existing database has .dbf & .cdx files.
If you wish to use CDX index, for instance, you can use
create index int1,char1 of test1.cdx on test (int1 unique ,char1+int1 for not empty(char1));
create index int1 of test.cdx on test (int1 ASC);
CREATE [UNIQUE] INDEX [IF NOT EXISTS] indexName[(keylength)][,...] [OF indexFileName] ON tableName (expression [UNIQUE] [PRIMARY KEY] [ASC|DESC] [FOR expression][,...])
>I believe this may be the reason that I'm struggling with writing to our existing tables.
If there's other Xbase application is using the same table, that application can't see the IDX index, because in Xabse applicaation, it need set index to anIndexFileName to use that index.
>.cgp
CGP file is a text file which used to maintain nonstructural index file Information. If you used only structural .cdx file associated with the table (.dbf) file, you needn't it. HXTT DBF can load automatically structural .cdx file.
|
|
What's your issue for your existing tables?
|
Thank you for your help.
The problem was on our end. We have it fixed now.
|
|
BTW, if your old Foxpro application is modifing your existing tables, you need lockType=FOXPRO connection property to let HXTT DBF and Foxpro application can see each other.
|