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

Posted on 2009-05-10
Medium Priority
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
  • 2
  • 2
LVL 12

Expert Comment

ID: 24347639
Line 12 has the text "(Line 13)" in it...is 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 750 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…

590 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