Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error 800a0409

Status
Not open for further replies.

cic

Technical User
Apr 12, 2001
28
US
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(&quot;LastName&quot;)
FirstName = Request.Form(&quot;FirstName&quot;)

Dim strSql
strSql = &quot;INSERT INTO Clients
(LastName,FirstName)
VALUES ('&quot; & LastName & &quot;','&quot; & FirstName & &quot;')&quot;

Dim objCmd
Set objCmd = Server.CreateObject(ADODB.Command&quot;)
objCmd.Active Connection = &quot;Driver={Microsoft Access Driver _
(*.MDB}; DBQ=&quot; & Server. MapPath(&quot;cars.mdb&quot;)
objCmd.CommandText = strSql
ObjCmd.Execute
Set objCmd = Nothing%>
</BODY>
</HTML>
 
try

strSql = &quot;INSERT INTO Clients &quot; & _
&quot;(LastName,FirstName) &quot; & _
&quot;VALUES ('&quot; & LastName & &quot;','&quot; & FirstName & &quot;')&quot;
 
Thanks, but I am still getting the error. Is it possible that I don't have my database setup correctly?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top