ASP Error - Microsoft OLE DB Provider for SQL Server error '80040e14'

Posted on 2009-05-10
Last Modified: 2012-06-27

I get this error message on my ASP web page.  

Any ideas
Cheers Geoff

Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near 'index'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.

/index.asp, line 13

<!--#include file="Connections/dboMTT_cs.asp" -->
Dim rsIndex
Dim rsIndex_cmd
Dim rsIndex_numRows
Set rsIndex_cmd = Server.CreateObject ("ADODB.Command")
rsIndex_cmd.ActiveConnection = MM_dboMTT_cs_STRING
rsIndex_cmd.CommandText = "SELECT heading, [date], contentmain, photocaption, photocredit, photolink, readmore FROM dbo.index" 
rsIndex_cmd.Prepared = true
Set rsIndex = rsIndex_cmd.Execute (line 13)
rsIndex_numRows = 0

Open in new window

Question by:jedtheguru
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
  • 2
LVL 12

Expert Comment

ID: 24347639
Line 12 has the text "(Line 13)" in that a copy/paste error or the source code?

Line 12 should say:
Set rsIndex = rsIndex_cmd.Execute

Author Comment

ID: 24347652

I have added this to indicate that this is line 13.  this is not in my code

Cheers Geoff
LVL 12

Accepted Solution

geowrian earned 250 total points
ID: 24347666
Thanks. I was hoping it was something simple like that.

Another possibly-simple thing: isn't "index" in "dbo.index" a reserved word? What if you put brackets around it?

Author Closing Comment

ID: 31579890
Thanks for that, I was being dumb.
Yes index was a reserved word

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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