Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More on performance issue
Message
 
To
13/10/2008 11:42:40
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01354488
Message ID:
01354621
Views:
21
>>I only use the sp_executesql when I've to execute dynamic SQL and return value(s) to the calling code. I don't remember ever using it from SSMS directly.
>
>Ok, based on your other message, basically, if sp_executesql makes a better use of the execution plan, then, would it be better to use this approach instead of using the SQLParameter object to create parameters and use a regular SQL command through the SQLClient data provider to access SQL Server?

Not sure for NET, but when in VFP I use parameters in my queries VFP explicitly use sp_executesql to run this query.
Just run SQL Profiler and see what command is send to SQL Server when you use parameters.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform