Solved

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

Posted on 2009-05-10
4
1,035 Views
Last Modified: 2012-06-27
Hi,

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

0
Comment
Question by:jedtheguru
[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
  • 2
4 Comments
 
LVL 12

Expert Comment

by:geowrian
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
0
 

Author Comment

by:jedtheguru
ID: 24347652
Hi,

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

Cheers Geoff
0
 
LVL 12

Accepted Solution

by:
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?
0
 

Author Closing Comment

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

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