Ok mcsa as promissed, this sample shows how to use ADOX to create the Acc97DB, then using ADO and SQL to create the table.
enjoy
VB Code:
'Add a reference to Microsoft ADO Ext. X.X For DLL And Security 'Add a ref for ADO Option Explicit Private cat As ADOX.Catalog Private cnn As New ADODB.Connection Private Sub Command1_Click() Dim SQL As String Set cat = New ADOX.Catalog ' create the db cat.Create "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\newDB.mdb" Set cat = Nothing 'create table using SQL instead of table def SQL = "CREATE TABLE TestTable (ID COUNTER, SetName TEXT(50), SetVal TEXT(255), Description TEXT(255))" 'open the db and create the table using ADO and SQL cnn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\newDB.mdb" cnn.Execute SQL cnn.Close End Sub





Reply With Quote