Solved

Syntax error in WHERE clause

Posted on 2009-07-15
3
233 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 50

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 50

Expert Comment

by:Gustav Brock
ID: 24861174
You are welcome!

/gustav
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

728 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