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

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

I'm trying to select from a full text index table,  But when i add it to the asp page and execute I get the following error message

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

The requested properties cannot be supported

can some please advice where I'm going wrong

<%Dim strProductID

strProductID = recordset1("makemodel")


<%set Recordset2 = Server.CreateObject("ADODB.Recordset")

Recordset2.ActiveConnection = MM_example_STRING

Recordset2.Source = "SELECT product_name, FROM feed WHERE CONTAINS(product_name, '"+strProductID+"')"

Recordset2.CursorType = 0

Recordset2.CursorLocation = 2

Recordset2.LockType = 3


Recordset2_numRows = 0


Open in new window

Question by:sparky74
    LVL 22

    Expert Comment


    There is a typo in the select statement, there shouldn't be a ','.

    "SELECT product_name FROM feed WHERE CONTAINS(product_name, '"+strProductID+"')"


    Author Comment

    Sorry Peter that was my mistake, I cut out a few other fields to post the statement and left the comma in by mistake

    it still produces the same error though


    Author Comment

    I have updated the following and the script seems to move on

    Recordset2.CursorLocation = 1
    Recordset2.LockType = 1

    and now I get this error

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

    Syntax error occurred near 'Aqua'. Expected ''''' in search condition 'Fred Aqua FV5260'.

    LVL 22

    Accepted Solution

    In your searchcondition in CONTAINS you also need to encapsulate the words with citationmarks ". Like this

    "SELECT product_name FROM feed WHERE CONTAINS(product_name, '\""+strProductID+"\"')"

    Author Comment

    Thanks Peter

    I just got it with

    WHERE CONTAINS(product_name, '"""+strProductID+"""')"


    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    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…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 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

    12 Experts available now in Live!

    Get 1:1 Help Now