vb.net登陆数据库验证问题

2025-02-03 04:36:09
推荐回答(1个)
回答1:

SqlConnection conn=...
SqlCommand com=new SqlCommand(conn,"select * from login where id='"+id+"' and psw='"+psw+"'")
DataReader dr=com.executeReader
if dr.movenext then
    dim sd$=dr.getString(2)
endif
session.xxxx
'照记忆打的,好久不用了。大致这样子