Create table
-
Hi I need to create new tables from my program in a Access database. I'm using the odbc components and sql queries to access the database. What would the query look like? Thanks
-
Hi I need to create new tables from my program in a Access database. I'm using the odbc components and sql queries to access the database. What would the query look like? Thanks
Something like:
"create table Users (Id int primary key, Name varchar(100))"
Look up the reference for thecreate table
command for complete syntax. I would recommend using OleDb instead of OCDB, if possible. Also, creating tables is something that you would not normally do from code. If you feel that you need to add tables dynamically to add more data, most likely your database design is not flexible enough.--- b { font-weight: normal; }
-
Hi I need to create new tables from my program in a Access database. I'm using the odbc components and sql queries to access the database. What would the query look like? Thanks
I am unsure if you can just pass create table syntax to Access, or if you need to use ADOX.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog