请各位大虾看下那里出错了!!!!
至少一个参数没有被指定值。 (那里错了)下面是代码:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim objconn As New OleDbConnection
objconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mydb.mdb")
objconn.Open()
Dim objcmd As New OleDbCommand
objcmd.Connection = objconn
objcmd.Parameters.Add("@ID", OleDbType.Char).Value = TextBox1.Text
objcmd.Parameters.Add("@密码", OleDbType.Char).Value = TextBox2.Text
objcmd.Parameters.Add("@性别", OleDbType.Char).Value = TextBox3.Text
= "insert into 信息表(ID,密码,性别) values (?,?,?)"
objcmd.ExecuteNonQuery()
objconn.Close()
Response.Write("<script language='javascript'>alert('注册成功');</script>")
End Sub
Sub checkuser(ByVal sender As Object, ByVal e As ServerValidateEventArgs)
Dim objconn As New OleDbConnection
objconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mydb.mdb")
objconn.Open()
Dim objcmd As New OleDbCommand
objcmd.Connection = objconn
= "select * from 信息表 where ID=' " & TextBox7.Text & " '"
Dim objreader As OleDbDataReader = objcmd.ExecuteReader
e.IsValid = Not (objreader.Read())
objreader.Close()
objconn.Close()
End Sub
[[it] 本帖最后由 twtdd 于 2008-7-1 14:59 编辑 [/it]]
[[it] 本帖最后由 twtdd 于 2008-7-1 15:00 编辑 [/it]]