[求助]为什么错误?
做登录窗口时有错误,在模块中为:public conn as new adodb.connection
public rs as new adodb.recordset
错误显示:指定的初始化字符串不符合ole db规定,这是什么意思?请高手指点!private sub cmdcancel_click()
dim k as integer
dim sql as string
db = app.path & "\students.mdb"conn.open "provider=microsoft.jet.oledb.4.0;data source='" & db
sql = "select * from 登录表 where 用户用='" & txtusername.text & "'" & " and 密码='" & txtpassword.text & "'"rs.open sql, conn, adopenstatic, adlockoptimisticif rs.recordcount > 0 then
unload me
information.show
else
if k > 2 then
msgbox "你已经输入3次错误,系统自动关闭!"
end
end if
msgbox "用户名、密码错误!"
k = k + 1
end if
end sub
做登录窗口时有错误,在模块中为:public conn as new adodb.connection
public rs as new adodb.recordset
错误显示:指定的初始化字符串不符合ole db规定,这是什么意思?请高手指点!private sub cmdcancel_click()
dim k as integer
dim sql as string
db = app.path & "\students.mdb"conn.open "provider=microsoft.jet.oledb.4.0;data source='" & db
sql = "select * from 登录表 where 用户用='" & txtusername.text & "'" & " and 密码='" & txtpassword.text & "'"rs.open sql, conn, adopenstatic, adlockoptimisticif rs.recordcount > 0 then
unload me
information.show
else
if k > 2 then
msgbox "你已经输入3次错误,系统自动关闭!"
end
end if
msgbox "用户名、密码错误!"
k = k + 1
end if
end sub
解决方案 »
- 求在软件上显示广告图片的代码
- label控件的问题?
- VB6.0的应用程序能读写Cookie吗?
- vb如何用shell打开word文档
- 请问文件名读取问题
- 在VB中如何实现将Excel表格数据导入SQL Server数据库表中?
- 紧急求教--请问那可以下载到可把指定关键词高亮显示的编辑控件-VB6版本。
- 我想做一个浏览光盘中文件的程序,用TreeView控件和ListView控件,有若干问题求教!
- 关于vb访问SQL的权限的问题
- 关于TreeView控件的初级菜鸟问题!
- 请问有没有哪可以下到似于80分,或拖拉机之类的游戏源码
- ▁▂▃▄▅▆▇█ 想使你的Frame变成XP风格(非WinXP有效)吗?想使你的Frame的背景变成透明的吗?cXPFrame可以完成你的愿望
Public cn As ADODB.Connection, cmd As New ADODB.Command, rs As ADODB.RecordsetSet cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\metewand.mdb;" 'Persist Security Info=False"
cn.CommandTimeout = 10
cn.Open
Set cmd.ActiveConnection = cn我开个帖你进来拿分
public conn as new adodb.connection改为public conn as adodb.connection
public rs as new adodb.recordset改为public rs as adodb.recordset