The following code is an example of creating a Table and Columns using ActiveX Data Objects (ADO):
Sub CreateEmployee() Dim cn As ADODB.Connection
End Sub
Dim strSQL As String
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=c:\test.mdb;"
cn.Open
strSQL = "CREATE TABLE `Employee` (`Last Name` varchar(30), `First Name` varchar(30), `Age` integer)"
cn.Execute strSQL
cn.Close
Posted by
Catholic Prayers
on
Thursday, August 23, 2007
0 comments