Re: How to tackle error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
- From: "Bob Barrows" <reb01501@xxxxxxxxxxxxxxx>
- Date: Thu, 1 Jan 2009 10:08:39 -0500
Au Zehong wrote:
Hi there,
I am experiencing a problem like the following:
------------------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression 'Type=mixed developmentORDER BY id DESC'.
/_____13_/naconsult/projects.asp, line 81
-------------------------------------------------------------------------
Nothing to do with your problem but you should switch to the native Jet OLE
DB provider:
http://www.aspfaq.com/show.asp?id=2126
<snip>
and my script is something like this:
-------------------------------------------------------------------------
<%
' Set the SQL Statement to get the information from the database<snip>
strSQL="SELECT * FROM tblProjects WHERE Type=" &
Request.QueryString("dome") & "ORDER BY id DESC"
' Open the Database
We cannot debug a sql statement unless we know what it contains. The only
way to determine this is to add this statement and run your page:
Response.Write strSQL
If the problem does not jump out at you, then post the result here.
Hint: look for a missing space.
Further points to consider:
Your use of dynamic sql is leaving you vulnerable to hackers using sql
injection:
http://mvp.unixwiz.net/techtips/sql-injection.html
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23
See here for a better, more secure way to execute your queries by using
parameter markers:
http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/72e36562fee7804e
Personally, I prefer using stored procedures, or saved parameter queries
as
they are known in Access:
Access:
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=e6lLVvOcDHA.1204%40TK2MSFTNGP12.phx.gbl
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=eHYxOyvaDHA.4020%40tk2msftngp13.phx.gbl
--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- References:
- Prev by Date: How to tackle error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
- Next by Date: Re: How to tackle error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
- Previous by thread: How to tackle error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
- Next by thread: Re: How to tackle error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
- Index(es):
Relevant Pages
|