Solved

ODBC Error

Posted on 2013-01-09
16
404 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
Industry Leaders: 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!

 
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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

756 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