471,330 Members | 1,682 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

SQLCommand.Prepare method ???

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
Jul 21 '05 #1
1 4249
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

"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:20**********************************@microsof t.com...
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

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by ProgDario | last post: by
3 posts views Thread by fmarchioni | last post: by
1 post views Thread by Tom | last post: by
1 post views Thread by serge calderara | last post: by
reply views Thread by Agnes | last post: by
20 posts views Thread by John Bailo | last post: by
10 posts views Thread by John Bailo | last post: by
2 posts views Thread by sauve mark | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.