Reputation: 11596
I know in Java, when using PreparedStatement with parameters, some JDBC drivers will optimize the SQL queries by turning them into stored procedures so that all the subsequent calls will run faster. Does SqlCommand provide such optimization when accessing MS SQLServer?
Upvotes: 3
Views: 542
Reputation:
You can call command.Prepare() to perform this optimization.
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.prepare.aspx
Upvotes: 2