"dim rst as new adodb.recordset"
you just use a recordset with ado speciallyfor 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对了,下次咱说汉语,行么?
you just use a recordset with ado speciallyfor 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对了,下次咱说汉语,行么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货