Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Syntax error in WHERE clause

Posted on 2009-07-15
3
Medium Priority
?
235 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 1000 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

721 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