插入记录时出错了
各位帮我看一下,哪错了,提示"order" 附件有语法错误错误提示行为红色字的那行.
而且我调试的时候看,系统提示strsql和cmd都为空.以前这么做没事的.谢谢各位了`~~
Sub dd_click(ByVal sender As Object, ByVal e As EventArgs)
Dim conn As SqlConnection = New SqlConnection("database=xf;uid=sa;pwd=;")
Dim strsql As String
strsql = "insert into order(ordername,ordersex,ordertel,orderemail,orderaddr,orderpcode,orderdate) values('" & name.Text & "','" & sex.SelectedItem.Text & "','" & tel.Text & "','" & email.Text & "','" & addr.Text & "','" & pcode.Text & "','" & adddate.Text & "')"
Dim cmd As New SqlCommand(strsql, conn)
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
tjmessage.Text = "提交成功,欢迎下次再来!"
End Sub
[此贴子已经被作者于2006-12-19 16:14:56编辑过]