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
Mysql Query to select from two tables
Teaching iPhone app creation...Any advice?
Excel 2007 Can Not Display Images From Web
Java synchronized Thread issue
Does ADO.Net provides any standard processo to swith to/from connected to disconnected datasource?
Error while archiving folder "IPM_SUBTREE"
Access is denied, unable to remove device when trying to delete a printer.
Mac Mail + Exchange 2007 keeping drafts in the 'Drafts' folder after they are sent
DameWare vs. RDP
Outlook 2003 POP3 account continues to download duplicate messages