Solved

ODBC Error

Posted on 2013-01-09
16
398 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
  • 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
 
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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 30

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 30

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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 the fundamental information of how to create a table.

747 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

13 Experts available now in Live!

Get 1:1 Help Now