首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

登录代码调试有关问题

2012-01-05 
登录代码调试问题未处理的“System.MissingMemberException”类型的异常出现在microsoft.visualbasic.dll中。

登录代码调试问题
未处理的“System.MissingMemberException”类型的异常出现在   microsoft.visualbasic.dll   中。

其他信息:   未找到类型“String”的公共成员“Value”。


Dim   strSQL   As   String
                Dim   cn   As   New   SqlClient.SqlConnection
                Dim   rs   As   New   DataSet
                cn.ConnectionString   =   "server=COMPUTER;Database=NEW;uid=sa;Password=; "
                cn.Open()
                strSQL   =   "select   密码   from   登录   where   用户名= ' "   &   用户登录_Renamed.Text   &   " ' "
                Dim   da   As   New   SqlClient.SqlDataAdapter(strSQL,   cn)
                Dim   count   As   Int32   =   da.Fill(rs)
                If   count   =   0   Then
                        MsgBox( "用户名不正确 ")
                Else
                        If   rs.Tables(0).Rows(0)(0).Value   =   Text1.Text   Then
                                MsgBox( "登录成功 ")
                        Else
                                MsgBox( "密码错误 ")
                        End   If
                End   If


调试后
If   rs.Tables(0).Rows(0)(0).Value   =   Text1.Text   Then

这行是黄字显示




[解决办法]
rs.Tables(0).Rows(0).Item(0).ToString

热点排行