J
jjfjr
Hi;
I'm trying to update an MS Access database with the following code which is
in a Javascript portion of my code for this page created in FrontPage:
var sqlstr = "UPDATE UserInfo SET
FirstName = document.userForm.FirstName.value,
LastName = document.userForm.LastName.value,
Gender = document.userForm.Gender(item).value,
AgeRange = document.userForm.Age(item).value,
FlyTime = document.userForm.FlyTime(item).value,
City = document.userForm.City.value,
State = document.userForm.State.value"
// Build the connection string
var strConn = "Driver={Microsoft Access Driver
(*.mdb)};DBQ=" + Server.MapPath("D:\OLD D\neam_hist\neam_user_info.mdb");
// Create the connection object
var dbConn = Server.CreateObject("ADODB.Connection")
// Open the Connection
dbConn.Open(strConn);
// Execute query
var rs = dbConn.Execute(sqlStr);
When I hit the submit button to validate the form and execute this SQL
command, I get this :
Unterminated string constant
UserInfo is the only table in neam_user_info.mdb. I'm a little new at trying
to bridge the gap between a form in HTML and an Access database so I'd
appreciate any help.
I'm trying to update an MS Access database with the following code which is
in a Javascript portion of my code for this page created in FrontPage:
var sqlstr = "UPDATE UserInfo SET
FirstName = document.userForm.FirstName.value,
LastName = document.userForm.LastName.value,
Gender = document.userForm.Gender(item).value,
AgeRange = document.userForm.Age(item).value,
FlyTime = document.userForm.FlyTime(item).value,
City = document.userForm.City.value,
State = document.userForm.State.value"
// Build the connection string
var strConn = "Driver={Microsoft Access Driver
(*.mdb)};DBQ=" + Server.MapPath("D:\OLD D\neam_hist\neam_user_info.mdb");
// Create the connection object
var dbConn = Server.CreateObject("ADODB.Connection")
// Open the Connection
dbConn.Open(strConn);
// Execute query
var rs = dbConn.Execute(sqlStr);
When I hit the submit button to validate the form and execute this SQL
command, I get this :
Unterminated string constant
UserInfo is the only table in neam_user_info.mdb. I'm a little new at trying
to bridge the gap between a form in HTML and an Access database so I'd
appreciate any help.