Creating a table dynamically in ACCESS
- From: "HD" <dumh@xxxxxxxxxxx>
- Date: Tue, 28 Mar 2006 10:36:31 -0500
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
.
- Follow-Ups:
- Prev by Date: Re: Record not found or changed by another user
- Next by Date: Delphi 2005, ADO, XML
- Previous by thread: D7-access problem
- Next by thread: Re: Creating a table dynamically in ACCESS
- Index(es):