 |
|
ระบบ สมัครสมาชิก เออเลอร์ครับ กรอบข้อมูลแล้วกดยืนยันการสมัคร มันก็เด็งมาที่โปรแกรม ที่ตัว myCommand.ExecuteNonQuery() ครับ ช่วยที่ครับ |
|
 |
|
|
 |
 |
|
Code (VB.NET)
Imports System.Data
Imports System.Data.SqlClient
Partial Class Register
Inherits System.Web.UI.Page
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim connectionString As String = "Data Source=MACKSY-PC\SQLEXPRESS;Initial Catalog=computer;Integrated Security=True"
Dim myConnection As SqlConnection = New SqlConnection(connectionString)
myConnection.Open()
Dim myInserQuery As String = "INSERT INTO member1 (username,password,firstname,lastname,email,adress,tel) VALUES ('" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox5.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "')"
Dim myCommand As New SqlCommand(myInserQuery)
myCommand.Connection = myConnection
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
Response.Redirect("login.aspx")
End Sub
End Class
Tag : ASP.NET VB.NET
|
|
 |
 |
 |
 |
Date :
2013-06-30 00:07:07 |
By :
แม็คซ์ |
View :
830 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Debug / Error อะไรครับ ? 
|
 |
 |
 |
 |
Date :
2013-06-30 07:05:36 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|