create a table on MySQL using ODBC

A

ans

(mysql database is hosted on the web, I have the right to create tables)
I can manually start a qyery, connect to my correct ODBC driver, choose
the destination, and give the new table on mysql (still at the web)
the desired name

I want to do this using vba, but I can not figure how to do this.?
 
C

Chris

Use DDL. Look up Create Table in the help, or on the web.

Dim conn as New ADODB.Connection
'Set up your connection here.
Conn.open "DSN=MyDSN"
Conn.Execute "CREATE TABLE MyTable (Field1 Char(50),Field2
Char(255))"


Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top