Create Table in Sql Database using Access VBA (1 Viewer)

danadams01

New member
Local time
Today, 20:57
Joined
May 21, 2022
Messages
1
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
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:57
Joined
Feb 19, 2002
Messages
43,372
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.
 

isladogs

MVP / VIP
Local time
Today, 18:57
Joined
Jan 14, 2017
Messages
18,247
@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
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:57
Joined
Feb 19, 2002
Messages
43,372
I saw that but lots of new members make this mistake.
 

Users who are viewing this thread

Top Bottom