469,594 Members | 2,118 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,594 developers. It's quick & easy.

Executing a stored procedure that uses linked server from vb.NET

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 Security=SSPI;Persist Security
Info=False;Initial Catalog=DB;Data Source=Server;"

MyBase.selectString = "Exec sp_storedprocedure1 var1,var2,var3"

The stored procedure takes the 3 arguments and uses joins to 2 other
db-servers that I have access to via linked server connections. (MS SQL

I can run the stored proc on in QA on my MS SQL with no prob.

Must i open connections to the 2 linked servers from .NET as well?

Glad for any opinions so i dont have to rewrite my sp,


Jun 22 '06 #1
4 2208
....or does it have something to do with permissions on the linked
server? Maybe .NET does not have access to the linked servers? On the
other hand I thought that .Net would only start the sp as is, with the
same result as if I started it in QA...


Jun 22 '06 #2
....I wrote a smaller sp to test if it was the linked server that made a
mess. But it turns out that it worked out fine. Therefore it is not a
matter of login or linked server. I figure it might be the fact that
the sp takes about 15 min to execute. I have tried to set the
..cmdTimeout = 15000. Is there a way to set the connection time also?


Jun 22 '06 #3
.......and timeout problem it was!

(MyBase.cmdTimeout = 15000)
topic.close() //Mikael

Jun 22 '06 #4
.......and timeout problem it was!

(MyBase.cmdTimeout = 15000)
topic.close() //Mikael

Jun 22 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Leedrick | last post: by
reply views Thread by SOI_0152 | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.