SQLCommand.Prepare method ???

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
 
A

Alex Passos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top