Hi to all,

I am using Apollo .NET to create a VB.Net application which can connect to a Clipper database (DBF with multiple NTX indexfiles).
Using SQL I can give Query commands to the Apollo Database Engine, thus be able to reach the data.

But one of my problems is that I cannot generate NTX indexfiles with Apollo and SQL. Accessing the help file provides me the following:
* For a FoxPro table, creates NAMES tag inside CUSTOMER.CDX on "LAST+FIRST" */ 
CREATE INDEX names ON "customers.dbf" (last, first) 
/* For a HiPer-SIx table, creates UNIQUE CUSTNO tag inside ORDERS.NSX on "CUSTNO" */
CREATE UNIQUE INDEX custno ON "orders.dbf" (custno)
/* For a Clipper table, creates NAMES.NTX on "LAST+FIRST" */
CREATE INDEX names ON "customers.dbf" (last, first)
Using this statement I try to create an index file, but Apollo always generates a FoxPro (CDX) indexfile....

Browsing some more in the helpfile also shows that Apollo allows me to use Inline definitions with a SQL statement. This will disable automatic table parsing, and is supposed to give the user the control over the table parsing.
An example of Inline definitions is:
Select * From City, State Where City.StateCode = State.StateCode
[* TableName: CITY.dbf, Alias: CITY, TableType: ttsxNTX, OEMTranslate: False, Password: "",
ExtraIndexes: CITYNM.NTX, CITYST.NTX | TableName: STATE.dbf, Alias: STATE, TableType:
ttsxNTX, OEMTranslate: False, Password: "", ExtraIndexes: STATCODE.NTX *]
Reading the inline definition I can read the following. The tablefile is City.dbf, the Alias is City, the tabletype is Clipper (ttsxNTX = Clipper, ttsxFOX = FoxPro and ttsxNSX = HiPer-SIx) and it uses the Indexfiles CityNM.ntx and CityST.ntx.
Using inline definitions gives me only partially the results I require. When creating indexfiles it doesn't work for me as Apollo .Net still keeps generating FoxPro (CDX) indexfiles.

The only thing I can get working using the Inline definitions is the following, inserting data into a DBF database, whilst editing 1 indexfile. Using the following code:
INSERT INTO CarDB VALUES ('Alfa Romeo','GT','CP2','B', 2)
[* TableName: cardb.dbf, Alias: cardb, TableType: ttsxNTX, OEMTranslate: False, Password: "", ExtraIndexes: cardb.ntx *]
This does insert a record into the Car database and edits the cardb.ntx file to comply with the dbf file. The next thing to try is inserting data into a Database file which uses multiple NTX indexfiles. In the ExtraIndexes definition using all the NTX files which the table has. ie. ExtraIndexes: cardb_nm.ntx, cardb_mdl.ntx.. as this is the way the help file describes the usage of the extraindexes inline definition. (Haven't tried to update or delete a record yet, but I suspect it will face the same problem, DBF files with 1 NTX file probably will work, DBF files with multiple NTX files probably won't work.)

Next thing I tried is trying to create a Clipper table using the Apollo component. Using this command a table is generated. Again making use of inline definition to make sure the table created is in the right format:
CREATE TABLE "klokdb.dbf" (KlokID INTEGER, StartTijd CHAR(19), EindTijd CHAR(19))
[* TableName: klokdb.dbf, Alias: klok, TableType: ttsxNTX *]
I know the table is in the correct format, because xBase can open the table and display all the records. Then I again try to create an index, using the following code:
CREATE INDEX KlokDB_ID ON "klokdb.dbf" (KlokID)
But this still keeps creating a FoxPro(CDX) indexfile. Trying to create the index with Inline definitions also doesn't work. The code creating the index with Inline definitions is the following:
CREATE INDEX KlokDB_ID ON "klokdb.dbf" (KlokID)
[* TableName: klokdb.dbf, Alias: klokdb, TableType: ttsxNTX *]
I now have the idea I used up all options. Opening DBF tables which were created with the component, as well as tables which were generated with xBase. Creating indexfiles won't work, only editing already made indexfiles works, but only when the table has 1 indexfile, multiple won't budge.

My ideas and inspiration are getting low at this time, and browsing the internet I also can't find any usefull information. Looking at the Vista Software website I cannot find any support at all. There is no email adress where I can get even the slightest bit of information in the right direction. There is a newsserver available, but A) it is completely empty, and B) it is read only because of a server migration.

If anybody can give me a boost in the right direction on how to create indexfiles, and on how to use multiple indexfiles I would sure be gratefull to him/her! Also in advance, sorry for the lengthy opening post.

To a moderator: if the subforum SQL is incorrect, please place this topic in the right forum. As I didn't know if it had to be placed in the SQL, .NET or Other Database section.