SQLCommand.Prepare method ???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • serge calderara

    #1

    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.Prep are method before
    executing.

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

    thanks for your reply
    Serge
  • Alex Passos

    #2
    Re: SQLCommand.Prep are method ???

    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" <sergecalderara @discussions.mi crosoft.com> wrote in
    message news:2097F0BF-94E9-4F88-AD19-2526481567A9@mi crosoft.com...[color=blue]
    > 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.Prep are method
    > before
    > executing.
    >
    > What does that prepare really do ? Is it caching somehow the whole select
    > statement ?
    >
    > thanks for your reply
    > Serge[/color]


    Comment

    Working...