加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

[VB.NET]问个问题

发布时间:2020-12-16 23:46:36 所属栏目:大数据 来源:网络整理
导读:问个问题 mycommand=new oledbcommand( "select * from password where userid= '' " txtuserid " '' ",myconnection) 请大家看下这句话有错误么 myreader=mycommand.executereader 着是错误的地方 定义的都没有问题的 提示信息是from 语法错啊 conn.Open()
问个问题 mycommand=new oledbcommand( "select * from password where userid= '' " &txtuserid & " '' ",myconnection) 请大家看下这句话有错误么 myreader=mycommand.executereader 着是错误的地方 定义的都没有问题的 提示信息是from 语法错啊 conn.Open() Dim sql = "select * from logo where name= '' " & TextBox1.Text & " '' " Dim comm As New Data.OleDb.OleDbCommand(sql,conn) Dim dr As OleDbDataReader = comm.ExecuteReader() dr.Read() If TextBox2.Text = dr.GetString(1) Then s = New System.Threading.Thread(AddressOf Module1.runF3) s.Start() Me.Close() Else MessageBox.Show( "密码输入错误,请重新输入! ") TextBox2.Text = " " End If __________________________________________________________________________ 1.由于某些是关键字,最好使用[],如select * from [password] 2,保证字段类型正确,如整型字段不加 '',如 "select * from [password] Where userid = " + userID 3,替换 '',如Dim sql = "select * from logo where name= '' " + TextBox1.Text.Replace( " '' "," '' '' ") + " '' " __________________________________________________________________________ 我在学习楼上的高手能不能讲的细点呀 虽然不是我提的问题 但我也想听 拜托了 __________________________________________________________________________ 你的那个表名方便的话你修改下!是关键字啊! __________________________________________________________________________ To:net_lover(【孟子E章】) 怎么通过sql语名存储 ''符号? __________________________________________________________________________

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读