Hi,
Not sure if this is right place to post this, please move if needed.
I set up a web form so that the text from a set of text boxes was inserted into a database when you 'submitted' the form
Since then I have added some validation to the boxes using javascript, to make sure the boxes arent empty etc.
However, it no longer inserts the text into the database, below is what the code looks like now, and all I get as a result is nothing, leaves the field seemingly empty. Just the field surname is the input box at the moment, as I have used javascript to check that there is text in there, so they won't submit a form with bits missing
Any ideas?
conUsers = New Data.OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source = " & Path)
conUsers.Open()
Dim cmdstr As String = "INSERT INTO Users (FamilySurname, NumberOfMembersOfFamily, EmailAddress, TelephoneNumber, HomeAddress) "
cmdstr &= "VALUES ('" & request.getstr("surname") & "','" & txt_NoOfMembers.Text & "','" & txt_Email.Text & "','" & txt_Telephone.Text & "','" & txt_HomeAddress.Text & "') "
cmdSelect = New Data.OleDb.OleDbCommand(cmdstr, conUsers)
dtrResults = cmdSelect.ExecuteScalar
conUsers.Close()