If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Can't create a PARADOX file and insert records using ODBC

Can't create a PARADOX file and insert records using ODBC.

Using ODBC and MS Visual C++ 6.0 I am trying to create a Paradox (5.0) table
and
Insert records. I use SQL statements through SQLExecDirect().
The Jet Engine is 4.0 Service Pack6. Borland Database Engine (BDE) is also
present.

In order to insert records into a Paradox table there must be a primary key.

When I try to create the primary key in the CREATE TABLE statement (either
at the
field level or at the table level):

The first time I execute either of them after opening up the data source
I get the
error message "Could not find field." After that (even after dropping and
recreating
the table) I am told that "This operation cannot be performed on a Paradox
table without
a primary key."

I therefore attempted to add a primary key as follows:

ALTER TABLE MyTableName ADD PRIMARY KEY (RecordID)

The first time I exectute this after connecting to the data source I am told

"Index[here follows a long string of seemingly random characters] is not
a valid name."
After that: "This operation cannot be performed on a Paradox table without
a primary key."