大家来看看~~! SQL 语句写错了str1 = "select * from dl where users='" & (Text1(0).Text) & "' And keys = '" & (Text1(1).Text) & "'" 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 users=" & (Text1(0).Text) & " And keys = " & (Text1(1).Text)这个有问题,users='"& Text1(0).Text & "' And keys = '"& Text1(1).Text&"' 你的Adodc1.ConnectionString,Adodc1.CommandType是否设置了? Adodc1.CommandType = adCmdText 实时错误’91‘变量对象或with块变量未设置 你的数据源设置不正确。检查Adodc1.ConnectionString是否连接正常。 Dim str1 As Stringstr1 = "select * from dl where users='" & trim(Text1(0).Text) & "' And keys ='" & trim(Text1(1).Text) & "'"Adodc1.RecordSource = str1Adodc1.RefreshIf Adodc1.Recordset.eof Then msgbox "用户名或密码错误!!!"else msgbox "验证通过!!!"end if 实时错误’91‘变量对象或with块变量未设置那么导至上述错误的原因大都是因为连接字符不正确或你的查询语句中的表的名称不正确你再仔细查一查。 Adodc1.ConnectionString已经测通了~! 请教高手:关于VB开发 过程调用疑问求解~~ 一个建表问题 关于对象数组排序的一个问题 现在程序员泛滥成灾 高分紧急求救 关于excel自动化加载宏 data report报表的问题!!:)在线等待! 如何能动态地将dbf文件转为mdb文件格式? 我有一个问题想不通!!!! VB编程问题! 有一个很基础的问题,但是我怎么也不会
这个有问题,users='"& Text1(0).Text & "' And keys = '"& Text1(1).Text&"'
变量对象或with块变量未设置
检查Adodc1.ConnectionString是否连接正常。
str1 = "select * from dl where users='" & trim(Text1(0).Text) & "' And keys ='" & trim(Text1(1).Text) & "'"
Adodc1.RecordSource = str1
Adodc1.Refresh
If Adodc1.Recordset.eof Then
msgbox "用户名或密码错误!!!"
else
msgbox "验证通过!!!"
end if
变量对象或with块变量未设置那么导至上述错误的原因大都是因为连接字符不正确或你的查询语句中的表的名称不正确你再仔细查一查。