Create Table in Sql Database using Access VBA

I've spent the better part of today researching how to create a table in a SQL database via Access VBA. I can run a create table pass through query using the query tools, but when I convert it to code I get a "Data Type Conversion Error". Any and all help is appreciated.
Usually , you must use SQL manager app, create the table, THEN link it into Acces
 
The thread also suggested running DDL queries as pass through to create database objects.

It might help if you told us the business problem you are trying to solve. I have an application that is sold to the public. It comes with either ACE or SQL Server BE. So when I have to update the BE, I need to be able to send something to the clients since they would have to apply the updates. I create two sets, one for ACE and one for SQL Server. I bundle the ACE updates into a database that checks the version and makes sure that the updates have not yet been applied. It then runs the updates and updates the version table in the BE so that it matches the version in the new FE that goes with the BE. For SQL Server, I send them a .sql file that does the same thing but that their DBA will run for the client since they almost never have control over the server.
 
@Pat Hartman
The thread is 5 years old & was resurrected in post #21 by someone just copying the reply in post #2 (likely spammer?).
The OP has long since gone away
 
I saw that but lots of new members make this mistake.
 

Users who are viewing this thread

Back
Top Bottom