SQLCommand.Prepare method ???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

I have read on article that the same SQL querry is call many time, for
perfomramce reaon it is needed to call the SQLCommand.Prepare method before
executing.

What does that prepare really do ? Is it caching somehow the whole select
statement ?

thanks for your reply
Serge
 
It prepares the statement to be executed with the given parameters. The
bottom line is that with most systems you are still feeding an SQL statement
over the network to the server, prepare places all parameters with the
proper escaping int the statement before its sent over.

Alex
 
Back
Top