开头这句好像有问题
Dim Check_ID As String = Members.CheckID(userID.Text)
IF Check_ID="1" Then
Check_ID是 string 类型的
Check_ID="1" 表示的是赋值啊
不是等于
应该是==吧
Dim Check_ID As String = Members.CheckID(userID.Text)
IF Check_ID="1" Then
Check_ID是 string 类型的
Check_ID="1" 表示的是赋值啊
不是等于
应该是==吧
解决方案 »
- jquery+listbox的一个常见问题(设置技巧)求助
- 模板页中使用了updatepanel 怎么才能在其他页面中实现类似Response.Write("<script language= 'JavaScript '>alert('OK')</script>")的功能
- 数据库存储过程代码 请帮忙解释下
- 类似 这种效果怎么实现
- 用过MaxtoCode的请进来指点一下
- sqlconnection cn.open 后 使用,close(); 点解所连接的数据库连接还是存在。
- 高分紧急求助:详情请见帖子内容!!!
- 如何让网站自适应屏幕分辨率?
- 关于dll文件多处定义的错误
- 为什么我的IIS 总是启动的特别慢呢?
- 操作Oracle数据库Blob字段的问题,查遍csdn所有的帖子还没结果。。。。
- 读取excel到数据库时出现的问题:
标准表达式中数据类型不匹配。
好像就是这句不对,但我不知道错在哪里,而且我试过把dim customer_id去掉,同样不对!敬请之教!
Dim Customer_Id As String = Members.AddMember(Name.Text,userID.Text,Password.Text,Sex.SelectedItem.Text,Birthday.Text,Tel.Text,Address.Text,Email.Text)
Message2.InnerHtml = "添加成功"
SaveBtn.visible= False
但我不知错在哪里?
试一下改为Sex.SelectedItem.Value将Members.AddMenber这个函数的定义贴出来看看!
Dim myConnection As OleDbConnection = new OleDbConnection(ConfigurationSettings.AppSettings("DSN"))
Dim BeginCode As integer
Randomize
BeginCode=CInt(10000000 * ((9 * Rnd())+1))
Dim SQL As String
SQL="Insert into Customer(Customer_Name,Customer_ID,Customer_Pwd,Customer_Sex,"
SQL=SQL + "Customer_Birthday,Customer_Tel,Customer_Address,Customer_Email,Customer_Code) "
SQL=SQL + "values('" & fullName & "','" & userID & "','" & password & "','" & sex & "',"
SQL=SQL + "'" & Birthday & "','" & Tel & "','" & Address & "','" & Email & "','" & BeginCode & "')"
Dim myCommand As OleDbCommand = new OleDbCommand(SQL, myConnection)
myConnection.Open()
myCommand.ExecuteNonQuery()
Try
Dim mail As MailMessage = New MailMessage
mail.To = Email
mail.From = "[email protected]"
mail.Subject = "启用码"
mail.Body = cstr(BeginCode)
SmtpMail.Send(mail)
Finally
myConnection.Close()
End Try
Return UserID.ToString()
End Function
改为!SQL=SQL + "'" & Birthday & "','" & Tel & "','" & Address & "','" & Email & "','" & BeginCode.ToString() & "')"问题应该处在这里BeginCode是Integer类型的。