Solved

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

Posted on 2009-05-10
4
1,034 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now