Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ODBC Error

Posted on 2013-01-09
16
Medium Priority
?
409 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 1144 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 11

Assisted Solution

by:rajvja
rajvja earned 1144 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 1144 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 1144 total points
ID: 38759498
0
 
LVL 31

Assisted Solution

by:Wayne Barron
Wayne Barron earned 568 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 568 total points
ID: 38759791
0
 

Accepted Solution

by:
elyons1955 earned 288 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

722 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