Computing.Net > Forums > Web Development > Microsoft JET Database Engine error

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Microsoft JET Database Engine error

Reply to Message Icon

Name: seanbenham
Date: November 3, 2007 at 20:50:03 Pacific
OS: Server 2003
CPU/Ram: Sempron2600/512MB
Comment:

Microsoft JET Database Engine error '80040e14' Syntax error in INSERT INTO statement.

I have tired everything and don't know whats wrong.

Here is my code.

<%
Dim strJT, strLocation, strJobT, strDesc, strRequirements, strContact, strContDetails, data_source, con, sql_insert

Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function

strJT = ChkString(Request.Form("JobTitle"))
strLocation = ChkString(Request.Form("JobLocation"))
strJobT = ChkString(Request.Form("JobType"))
strDesc = ChkString(Request.Form("JobDescription"))
strRequirements = ChkString(Request.Form("JobRequirements"))
strContact = ChkString(Request.Form("ContactName"))
strContDetails = ChkString(Request.Form("ContactDetails"))

data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("db1.mdb")

sql_insert = "insert into employmentnotice (JobTitle, JobLocation, JobType, JobDescription, JobRequirements, ContactName, ContactDetails) & _
values ('" & strJT & "', '" & strLocation & "', '" & strJobT & "', '" & strDesc & "','" & strRequirements & "', '" & strContact & "', '" & strDetails & "')"

Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert

' Done. Close the connection
con.Close
Set con = Nothing
%>
----------------------

Maybe permission issues with IIS v6?



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: November 10, 2007 at 12:05:11 Pacific
Reply:

You have a double quote and a single quote after values( Get rid of the single quote - you don't need it there as there is nothing to match it with.

Stuart


0
Reply to Message Icon

Related Posts

See More


dedicated servers what's in an IP?



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Microsoft JET Database Engine error

IIS and ASP www.computing.net/answers/webdevel/iis-and-asp/1904.html

ASP Session Variables www.computing.net/answers/webdevel/asp-session-variables/1406.html

ASP to MySQL ? www.computing.net/answers/webdevel/asp-to-mysql-/2155.html