Solved

ODBC Error

Posted on 2013-01-09
16
407 Views
Last Modified: 2013-01-10
I am using Dreamweaver and created a SP with parameters that returns a recordset.

I get this error when I try to open the page:

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

[Microsoft][ODBC SQL Server Driver]Optional feature not implemented


First time I see it ... any ideas ?

Using ms sql 2008r2 and classic asp
0
Comment
Question by:amucinobluedot
[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
  • 9
  • 4
  • 2
  • +1
16 Comments
 

Author Comment

by:amucinobluedot
ID: 38759446
I am using dreamweaver and when i try to expand the 'recordset' created by the Stored procedure I get:

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.Select_ActivityLog'.


Even though the Stored procedure is clearly there in the database and permissions are correct.
0
 
LVL 11

Assisted Solution

by:rajvja
rajvja earned 286 total points
ID: 38759453
Hi
Can you see the connectionstring how it is established?

Please post here.
0
 

Author Comment

by:amucinobluedot
ID: 38759466
It is not the connection, it is the same connection i use in the same page and other pages for recordsets and other stored procedures and all those work fine.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 11

Assisted Solution

by:rajvja
rajvja earned 286 total points
ID: 38759467
Hi,

  I suspect the database it is pointing to.

So, please check the connectionstring.
0
 

Author Comment

by:amucinobluedot
ID: 38759471
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_eimmigration_STRING
MM_eimmigration_STRING = "dsn=database;uid=user;pwd=passwd;"
%>
0
 

Author Comment

by:amucinobluedot
ID: 38759474
Again .. not the connection, in fact when I am in design mode and i hit 'test' it works fine and returns the desired results, once I open the actual ASP page that is when I get the error.
0
 
LVL 11

Assisted Solution

by:rajvja
rajvja earned 286 total points
ID: 38759484
If not,

  The run time user which executes the asp page doesn't have permissions to the database/objects.
0
 
LVL 11

Assisted Solution

by:rajvja
rajvja earned 286 total points
ID: 38759498
0
 
LVL 31

Assisted Solution

by:Wayne Barron
Wayne Barron earned 142 total points
ID: 38759625
I found this article on Microsoft KB that might assist you.
http://support.microsoft.com/kb/214459

As you state that the connection to the database is fine, and there for, it must be something within the data structure that is causing this issue.

Carrzkiss
0
 

Author Comment

by:amucinobluedot
ID: 38759668
Tried the above 2 and same issue.

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.Select_ActivityLog'.


The SP is there as displayed in the screenshot below.
screenshot.gif
0
 

Author Comment

by:amucinobluedot
ID: 38759682
Also in SQL manager i am getting an error "Invalid object name", so i changed it but I still get the same error, this is why ASP can't find it.
Problem is the object is there and that is the correct name, why can't it find it ?
sqlmanager.gif
0
 
LVL 31

Assisted Solution

by:Wayne Barron
Wayne Barron earned 142 total points
ID: 38759791
0
 

Accepted Solution

by:
elyons1955 earned 72 total points
ID: 38761554
A  number of things to try:
Assuming the connection to the SP object is corrupted:
   1)  Refresh the Stored Procedures in SQL Server.  Then retry the connection.

  2)  Close SQL Server and your development environment.  Reboot the environments if you have the control over the environment to do so.  Then reopen both and retry the connection.

Or, assuming the SP object  itself is corrupted:
     Copy the entire text out of the SP into Notepad.  Delete the SP.  Then recreate it with the same name and use the text copied to NotePad to recover the script.  Retry the connection to the SP.
0
 

Author Comment

by:amucinobluedot
ID: 38761565
will do
0
 

Author Comment

by:amucinobluedot
ID: 38763549
It has not to do with permissions, in fact I re-created the procedure but REMOVED the parameters. Once I did it worked fine:


CREATE PROCEDURE [dbo].[SelectActivitylog]

AS
SELECT Id ,
        Firmid ,
        Userid ,
        Actdate ,
        Actdesc ,
        Actstatus ,
        Actdetails ,
        Module ,
        Fileuserid
 FROM dbo.ActivitiesLog


GO

---

So question now is what would the Sql syntax be so that it allows parameters to be added, for example:


ALTER PROCEDURE [dbo].[SelectActivitylog]
@Startdate DATETIME, @Enddate DATETIME

AS
SELECT Id ,
        Firmid ,
        Userid ,
        Actdate ,
        Actdesc ,
        Actstatus ,
        Actdetails ,
        Module ,
        Fileuserid
 FROM dbo.ActivitiesLog
 WHERE actdate BETWEEN @Startdate AND @Enddate

But as soon as I add the parameters above I get the error.
0
 

Author Comment

by:amucinobluedot
ID: 38763589
Somehow it just worked ... oh well .. who says computers don't have a mind of their own.
0

Featured Post

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

617 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