Microsoft
Software
Hardware
Network
Question : Problems with sp_executesql
If I am executing a query in MS Query Analyzer it runs in a few seconds. But when I want an ADO recordset of that query, it gives a timeout after 60 seconds.
I remarked that if I execute the query myself in MS Query it looks like this:
SELECT * FROM Customers
But when I intercept the query in Profiler, it looks like this:
exec sp_executesql N'(SELECT * FROM Customers (nolock))' And then it times out
When I add ‘exec sp_executesql’ in front of my query in MS Query Analyzer, it also gives timeouts.
Who can I avoid that MS SQL Server adds this command in front of my query?
Answer : Problems with sp_executesql
I see, I misunderstood your statement.
what is your connection string, aka how exactly do you run that query in your vb code, please?
Random Solutions
Wyse thin client and Citrix display/graphic lag
Windows XP BSOD 0x0000008e (0xc0000005, 0x805c3133, 0x96fc2a48, 0x00000000)
SBS2008 long login time Waiting for policy
MS Access Subform not showing
VB.net: Problem accesing form elements from other class (probably other thread)
Windows Vista, very slow to boot, Black screen
Cross-forest trust: The domain controllers required to find the selected objects in the following domains are not available
VB.net query problem
Silverlight ContentPresenter in Button Template
Group and ungroup a password-protected sheet?