Re: Creating a table dynamically in ACCESS



I found my problem... there should not be a space between the comma and the
name of the next field... had nothing to do with the typing of the field.

Thanks.

H. Dumas


"HD" <dumh@xxxxxxxxxxx> a écrit dans le message de
news:442957a2$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have gone through the Internet to find out how I can create a MDB
database
dynamically in Delphi. I have found my people with recipes that uses the
ADOX components.

I have done exactly as directed... Imported the Library renaming the
classes
by adding TADOX... I have added a AdoConnection, AdoCommand and
AdoXCatalog...
I create the Database fine, but when I try to create a table, I get a
EOleException Error: Syntax Error in Field Definition... My connection
looks
like this:
'Provider=Microsoft.Jet.OLEDB.4.0;DataSource=c:\temp\test.mdb;Jet
OLEDB:Engine Type=5'

and the table creation looks like this.... I have tried changing the
Integer for Int... but it still does not work... Should I be using NUMBER
or TEXT instead of INTEGER and VARCHAR???

CREATE TABLE rensg_tours (ID_ETABL INTEGER, NO_SEQ_DEC INTEGER, CATGR_ETBL
VARCHAR(6), NOM_CONTAC VARCHAR(22), PRE_CONTAC VARCHAR(22), ID_ENSEI1
INTEGER)

Please help,

H. Dumas




.