create a table on MySQL using ODBC

  • Thread starter Thread starter ans
  • Start date Start date
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.?
 
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
 
Back
Top