经过摸索,我是这样做的
Dim bd, cat As Object
bd = "c:\data.mdb"
cat = CreateObject("ADOX.Catalog")
cat.Create("provider=microsoft.jet.oledb.4.0;;Jet OleDb:DataBase Password=940434;data source=" + bd)
cat = Nothing
Dim connstr As String
Dim co, rs, aa As Object
co = CreateObject("ADODB.Connection")
connstr = "provider=microsoft.jet.oledb.4.0;;Jet OleDb:DataBase Password=940434;data source=" + bd
co.Open(connstr)
rs = CreateObject("Adodb.RecordSet")
aa = "CREATE TABLE yhxx(id Counter,姓名 text(255),性别 text(255))"
rs.Open(aa, co, 3, 3)
rs = Nothing
bd = Nothing
aa = Nothing
cat = Nothing
connstr = Nothing
co.close()
co = Nothing
GC.Collect()