先引用“Microsoft DAO 3.6 Object Library” Dim db As Database '数据库对象定义 Dim dbName As String '数据库文件名 dbName = "NewDB.mdb" Set db = CreateDatabase(dbName, dbLangChineseSimplified, dbEncrypt) '建立数据库 db.Execute "create table 表名 (field1 long,field2 text(8))" '添加表 db.Close Set db = Nothing
Dim dbName As String '数据库文件名
dbName = "NewDB.mdb"
Set db = CreateDatabase(dbName, dbLangChineseSimplified, dbEncrypt) '建立数据库
db.Execute "create table 表名 (field1 long,field2 text(8))" '添加表
db.Close
Set db = Nothing