Solved

Syntax error in WHERE clause

Posted on 2009-07-15
3
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 51

Accepted Solution

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

/gustav
0
 

Author Closing Comment

by:GegH
ID: 31603799
I love the simple answers.
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 24861174
You are welcome!

/gustav
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…
Suggested Courses

631 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