I am using asp to dump information from an html form to an access database. To be honest I am not sure what I am doing. I am trying to get by with some examples I have found in a book. Below is the error I keep getting and I can't figure out what I am doing wrong. Can anyone help? I have also included the asp code below.
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/database/files/addnow.asp, line 11
strSql = "INSERT INTO Clients
Below is my code:
<%@ Language=VBScript%>
<HTML>
<BODY>
<%
LastName = Request.Form("LastName"
FirstName = Request.Form("FirstName"
Dim strSql
strSql = "INSERT INTO Clients
(LastName,FirstName)
VALUES ('" & LastName & "','" & FirstName & "')"
Dim objCmd
Set objCmd = Server.CreateObject(ADODB.Command"
objCmd.Active Connection = "Driver={Microsoft Access Driver _
(*.MDB}; DBQ=" & Server. MapPath("cars.mdb"
objCmd.CommandText = strSql
ObjCmd.Execute
Set objCmd = Nothing%>
</BODY>
</HTML>
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/database/files/addnow.asp, line 11
strSql = "INSERT INTO Clients
Below is my code:
<%@ Language=VBScript%>
<HTML>
<BODY>
<%
LastName = Request.Form("LastName"
FirstName = Request.Form("FirstName"
Dim strSql
strSql = "INSERT INTO Clients
(LastName,FirstName)
VALUES ('" & LastName & "','" & FirstName & "')"
Dim objCmd
Set objCmd = Server.CreateObject(ADODB.Command"
objCmd.Active Connection = "Driver={Microsoft Access Driver _
(*.MDB}; DBQ=" & Server. MapPath("cars.mdb"
objCmd.CommandText = strSql
ObjCmd.Execute
Set objCmd = Nothing%>
</BODY>
</HTML>