G
Guest
Hey
Trying to do a real simple online Newsletter form - an Insert into a SQL Server DB, but when the submit button is pressed, the page refreshes, but nothing is added to the DB.
Code
Dim ConDB As SqlConnectio
Dim strINSERT As Strin
Dim cmdINSERT As SqlComman
ConDB = New SqlConnection("Persist Security Info=False;User ID=xxx;password=xxx;Initial Catalog=xxx;Data Source=xxx"
strINSERT = "INSERT Newsletter " &
"(FName, SName, Email) " &
"Values ('" & Fname.Text & "','" & Sname.Text & "','" & Email.Text & "')
cmdINSERT = New SqlCommand(strINSERT, ConDB
ConDB.Open(
cmdINSERT.ExecuteNonQuery(
ConDB.Close(
appreciate your assistance guys.
Trying to do a real simple online Newsletter form - an Insert into a SQL Server DB, but when the submit button is pressed, the page refreshes, but nothing is added to the DB.
Code
Dim ConDB As SqlConnectio
Dim strINSERT As Strin
Dim cmdINSERT As SqlComman
ConDB = New SqlConnection("Persist Security Info=False;User ID=xxx;password=xxx;Initial Catalog=xxx;Data Source=xxx"
strINSERT = "INSERT Newsletter " &
"(FName, SName, Email) " &
"Values ('" & Fname.Text & "','" & Sname.Text & "','" & Email.Text & "')
cmdINSERT = New SqlCommand(strINSERT, ConDB
ConDB.Open(
cmdINSERT.ExecuteNonQuery(
ConDB.Close(
appreciate your assistance guys.