Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim useCON As New SqlConnection()
Dim useCom As New SqlCommand()
Dim strConnString, strSQL As String
strConnString = "Server=Pratcharat-pc\SQL2005;UID=sa;PASSWORD=;database=Payment;Max Pool Size=400;Connect Timeout=600;"
useCON.Open()
strSQL = "INSERT INTO Username(Username,Password,Name,Sruname) " & _
"VALUES ( '" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "' )"
useCom = New System.Data.SqlClient.SqlCommand(strSQL, useCON)
useCom.ExecuteNonQuery()
useCom = Nothing
useCON.Close()
useCON = Nothing
Me.Hide()
Login_Form.Show()
End Sub