tags:

views:

126

answers:

1

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?

+2  A: 

You can call command.Prepare() to perform this optimization.

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.prepare.aspx

Developer Art