Do you all see anything wrong with this code:
'Create ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set active connection
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("Database\DB.mdb")
strSQL = "INSERT INTO tblData (FName, LName, Month) VALUES ('John', 'Doe', 'May')"
adoCon.Execute (strSQL)
I want to insert data from a form, but continue to get Syntax error in insert statment. So I have taken the insert statement to constant values trying to find the error. When I write the statement to the screen all the data appears, but when I excute the statement I get the syntax error. Any thoughts???
Thanks,
Paul
'Create ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set active connection
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("Database\DB.mdb")
strSQL = "INSERT INTO tblData (FName, LName, Month) VALUES ('John', 'Doe', 'May')"
adoCon.Execute (strSQL)
I want to insert data from a form, but continue to get Syntax error in insert statment. So I have taken the insert statement to constant values trying to find the error. When I write the statement to the screen all the data appears, but when I excute the statement I get the syntax error. Any thoughts???
Thanks,
Paul