473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP - Reading Linked Server Stored Procedure

1
Hi,

basically i've ben searching forums and google with no success with my problem....

I've got a stored procedure which returns a select query on a linked server. This works fine if i call within SQL and Query Analyser but if i try and execue to return data to a ASP recordset i get the ridiculous

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].

Am i missing something really basic like a simple setting or is it just not possible.

Heres my ASP code:

Dim adoCon
Dim rsTList
Dim strSQL

Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DSN=extranet;"

strSQL = "EXEC sp_test"

Set rs = adoCon.Execute(strSQL)

do while not rs.eof

response.write(rs.fields(3) & "<br>")

rs.movenext

loop

rs.close()
adoCon.close()


Heres my Stored Procedure:

SELECT top 2 * FROM OPENQUERY(MY_LINKED_SERVER, ' SELECT * FROM mytable') Rowset_1

any ideas?

cheers
Oct 11 '07 #1
2 2551
jhardman
3,406 Expert 2GB
Best guess: it is a permissions problem. Make sure iUser_serverName has permission to access that database.

Jared
Oct 14 '07 #2
Hi,
Did you resolve this problem? am running into same. looks like permission issues, but i checked all permissions and everything looks fine.

any hints?


Hi,

basically i've ben searching forums and google with no success with my problem....

I've got a stored procedure which returns a select query on a linked server. This works fine if i call within SQL and Query Analyser but if i try and execue to return data to a ASP recordset i get the ridiculous

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].

Am i missing something really basic like a simple setting or is it just not possible.

Heres my ASP code:

Dim adoCon
Dim rsTList
Dim strSQL

Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DSN=extranet;"

strSQL = "EXEC sp_test"

Set rs = adoCon.Execute(strSQL)

do while not rs.eof

response.write(rs.fields(3) & "<br>")

rs.movenext

loop

rs.close()
adoCon.close()


Heres my Stored Procedure:

SELECT top 2 * FROM OPENQUERY(MY_LINKED_SERVER, ' SELECT * FROM mytable') Rowset_1

any ideas?

cheers
Oct 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: A.M. de Jong | last post by:
When I perform a query on a linked Oracle server in the Query analyser I have no prboblem' to perform this query. However, when I create this query in a stored procedure I get a compilation error...
1
by: mahajan.sanjeev | last post by:
Hi All, I am accessing a linked server (also a SQL Server) from a stored procedure. There is an insert statement that I run on a table in the linked server. This statement causes the Internal...
1
by: mxd | last post by:
We have server 2003 with sql 2000. as a client getting data from an IBM iseries server with DB2 UDB. The connection is through a linked sever with ODBC connection to DB2. If we invoke a SQL stored...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
1
by: chloe.crowder | last post by:
Hi We're trying to use call a stored procedure to update information in a remote Ingres database. We've linked the server, and can read information using SELECT * FROM OPENQUERY (..........),...
6
by: Neil | last post by:
After creating a linked server to a remote server, I needed to log in using sp_addlinkedsrvlogin to get my stored procedure to work. However, I noticed that after stopping SQL Server and the DTC...
4
by: Mikael.Bergstrand | last post by:
I can't execute my stored procedure from .NET (I think it might be because the stored proc has joins in it via linked servers). I get timeout error from .NET MyBase.connString ="Integrated...
2
by: sqlgirl | last post by:
Hi, We have 2 servers. Server1 is a 2000 box, with SP3 (yes I know it is not up to date). Server2 is a 2005 box, SP2. I set up Server1 (2000) to have a linked server to Server2 (2005). The...
6
by: barmatt80 | last post by:
Ok, I do not know what I am doing wrong. I have linked servers setup from SQL server 2005 to db2 using odbc dsn. I open sql server management studio and try to call a stored procedure on db2...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.