Solved

Syntax error in WHERE clause

Posted on 2009-07-15
3
227 Views
Last Modified: 2012-05-07
i seem to be getting this error message on my intranet page
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in WHERE clause.
/TelHMY.asp, line 24

The WHERE clause in question seems to be
<%
var HMYTel = Server.CreateObject("ADODB.Recordset");
HMYTel.ActiveConnection = MM_UseTelephone_STRING;
HMYTel.Source = "SELECT * FROM UseTelNumbers WHERE Group = '"+ HMYTel__MMColParam.replace(/'/g, "''") + "'";
HMYTel.CursorType = 0;
HMYTel.CursorLocation = 2;
HMYTel.LockType = 1;
HMYTel.Open();
var HMYTel_numRows = 0;
%>

HMYTel.Open(); is line 24.
The page is javascript .asp with a MS access database.
Any ideas
0
Comment
Question by:GegH
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 250 total points
Comment Utility
Try with [Group] as Group is a reserved word.

/gustav
0
 

Author Closing Comment

by:GegH
Comment Utility
I love the simple answers.
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
You are welcome!

/gustav
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now