[英]vb6 recordset sql query
How to use append query in vb6 with access db having a password?如何在具有密码的访问数据库中使用 vb6 中的追加查询? The following is giving an error.
以下是给出错误。
dim s as string
s="insert into patientprofile(crno) select patientprofile.crno from 'd:\liverrecord.mdb' & 'Jet OLEDB:Database Password=liver'"
It's not exactly clear what you want.目前还不清楚你想要什么。 However,
然而,
You first have to reference Microsoft DAO 3.6 Object Library.您首先必须引用 Microsoft DAO 3.6 对象库。 You can then open a database with the following two lines.
然后,您可以使用以下两行打开一个数据库。
Dim Engine As DAO.DBEngine: Set Engine = New DAO.DBEngine
Dim DB As DAO.Database: Set DB = _
Engine.Workspaces(0).OpenDatabase("D:\LiveRecord.mdb", false, false, _
"MS Access;PWD=liver")
You can access the sql statement with您可以访问 sql 语句
Call DB.Execute("insert etc")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.