请各位多多帮忙,我在程序中,动态创建一个时间型的Access数据库,例如123.mdb,表名为cc,另外我已经知道了SQL2000中的需要备份的表有cc,该如何利用sql2000中想对应的表的结构在ACCESS中创建同样的一个数据表,请各位多多帮忙!分数不够可以加。

解决方案 »

  1.   

    引用DAO
    Set wspDefault = DBEngine.Workspaces(0)
    ' Create new, encrypted database.
    Set dbs = wspDefault.CreateDatabase("C:\123.mdb", dbLangGeneral & ";pwd=NewPassword", dbEncrypt)AdoCN.Open "Provider=Microsoft.jet.oledb.3.51;data source=c:\123.mdb"AdoCN.Execute "select *  into [cc] from [ODBC;Driver={SQL Server};Server=" & strServer & ";UID=" & strUID & ";PWD=" & strPWD & ";Database=" & strDB & "].[cc]"