$mdb_data_path="sky.mdb"
$zhu = "C:\Documents and Settings\hhww\Application Data\Microsoft\Access\System1.mdw"
$newMdb = ObjCreate("ADOX.Catalog")
$newMdb.Create("Provider=Microsoft.Jet.OLEDB.4.0; User ID=admin;Persist Security Info=False;Jet OLEDB:System database=$zhu;Jet OLEDB:Database Password=123456789;Data Source=" & $mdb_data_path)
$newmdb.ActiveConnection.Close;建数据库
$addtbl = ObjCreate("ADODB.Connection")
$addTbl.Open("Provider=Microsoft.Jet.OLEDB.4.0; User ID=admin;Persist Security Info=False;Jet OLEDB:System database=$zhu;Jet OLEDB:Database Password=123456789;Data Source=" & $mdb_data_path)
$addTbl.Execute("CREATE TABLE " & $tblname)
$addtbl.Close;
为什么这样还是不行呢。 |