what the distinguish between dim rst as new adodb.recordset and dim rst as new recordset?thank you!

xfchenxh 2002-05-27 10:23:10
?
...全文
31 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
liboyang_bj 2002-05-27
  • 打赏
  • 举报
回复
"dim rst as new adodb.recordset"
you just use a recordset with ado specially

for example:
///////////////////////////////////////////////////
dim cnn as new adodb.connection
dim rst as new adodb.recordset
dim sqlStr as string

cnn.ConnectionString = "DSN=tax_db;UID=dba;PWD=sql"
cnn.Open
strSQL = "select * from userInfo where name='" & Combo1.Text & "' and pwd ='" & txtPassword.Text & "'"
rst.Open strSQL, cnn, adOpenKeyset, adLockOptimistic
If rst.RecordCount=1 then
该用户存在
Else
该用户不存在或口令错误
End If
///////////////////////////////////////////////////

As to "dim rst as new recordset"
you could use the rst more commonly this time

对了,下次咱说汉语,行么?

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧