sqlqrystrng = "UPDATE temp_user_details set user_name = @username, user_email = @useremail, user_contact = @usercontact, user_address=@useraddress WHERE user_id = @userida"
sqlqrystrng2 = "UPDATE user_type set user_password = @userpassword where user_id = @useridb"
string_cnct = sqlqrystrng & sqlqrystrng2
conn.open
cmd = New SqlCommand(string_cnct, conn)
cmd.Parameters.Add(cmd.CreateParameter).ParameterName = "@userida"
cmd.Parameters.Add(cmd.CreateParameter).ParameterName = "@useridb"
cmd.Parameters.Item("@userida").Value = struserid
cmd.Parameters.Item("@useridb").Value = struserid
问问题
283 次
1 回答
1
sqlqrystrng = "UPDATE temp_user_details set user_name = @username, user_email =
useremail, user_contact = @usercontact, user_address=@useraddress WHERE user_id =
userida"
sqlqrystrng2 = " UPDATE user_type set user_password = @userpassword where user_id = @useridb"
string_cnct = sqlqrystrng & sqlqrystrng2
conn.open
cmd = New SqlCommand(string_cnct, conn)
cmd.Parameters.Add(cmd.CreateParameter).ParameterName = "@userida"
cmd.Parameters.Add(cmd.CreateParameter).ParameterName = "@useridb"
cmd.Parameters.Item("@userida").Value = struserid
cmd.Parameters.Item("@useridb").Value = struserid
您需要在第二个字符串中的Update之前添加空格
于 2013-04-11T08:22:30.743 回答