Dim connection As New SqlConnection
Dim command As New SqlCommand
Dim command2 As New SqlCommand
connection.ConnectionString = "Server=XXXX;UID=sa;PASSWORD=XXXXX;Database=XXXXX;Max Pool Size=400;Connect Timeout=600;"
connection.Open()
command2.Connection = connection
command2.CommandType = CommandType.Text
command2.CommandText = "INSERT INTO UserInfo (fdUID,UserPass,UserEmail,UserPass2,fdAuthUserNum) VALUES ('" + Form2.TextBoxX1.Text + "','" + Form2.TextBoxX2.Text + "','" + Form2.TextBoxX3.Text + "','" + Form2.TextBoxX4.Text + "','" + Form2.TextBoxX5.Text + "')"
Try
If (Conversions.ToInteger(command2.ExecuteNonQuery) > 0) Then
Interaction.MsgBox("You account have been registered.", MsgBoxStyle.Information, "FunZ")
Else
Interaction.MsgBox("Register failed.", MsgBoxStyle.Critical, "Error 108 !")
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
connection.Close()
connection = Nothing