Solved

ODBC Error

Posted on 2013-01-09
16
400 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

911 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

25 Experts available now in Live!

Get 1:1 Help Now