ideal way for open and close connection


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: ideal way for open and close connection

  1. #1
    hammam Guest

    ideal way for open and close connection


    hi
    i have one main mdiform and may forms i ask what is the ideal way to open
    the connection is it one time in mainform load
    or open and close it in each form
    thanks




  2. #2
    Andrew Grillage Guest

    Re: ideal way for open and close connection

    There is no clear answer to this. It depends on the loading on your server
    as to whether you open a connection and keep it open, or open and close as
    you need. If the load on your server will not be too high then it is
    certainly convenient to open a connection for the duration of running your
    application and have the main form manage it.

    --

    Andrew Grillage
    http://www.concresco.com


    hammam <mhdhamam@hotmail.com> wrote in message
    news:390c1023$1@news.devx.com...
    >
    > hi
    > i have one main mdiform and may forms i ask what is the ideal way to open
    > the connection is it one time in mainform load
    > or open and close it in each form
    > thanks
    >
    >
    >




  3. #3
    hammam Guest

    Re: ideal way for open and close connection


    hi
    i found it's run if i clode and open connection before begintrans
    is it must u open the connection before begintrans directlty ?
    thanks

    "Andrew Grillage" <andrew@concresco.com.nospam> wrote:
    >There is no clear answer to this. It depends on the loading on your server
    >as to whether you open a connection and keep it open, or open and close

    as
    >you need. If the load on your server will not be too high then it is
    >certainly convenient to open a connection for the duration of running your
    >application and have the main form manage it.
    >
    >--
    >
    >Andrew Grillage
    >http://www.concresco.com
    >
    >
    >hammam <mhdhamam@hotmail.com> wrote in message
    >news:390c1023$1@news.devx.com...
    >>
    >> hi
    >> i have one main mdiform and may forms i ask what is the ideal way to open
    >> the connection is it one time in mainform load
    >> or open and close it in each form
    >> thanks
    >>
    >>
    >>

    >
    >



  4. #4
    Andrew Grillage Guest

    Re: ideal way for open and close connection

    You must open a connection before beginning a transaction.

    --

    Andrew Grillage
    http://www.concresco.com


    hammam <mhdhamam@hotmail.com> wrote in message
    news:390d0537$1@news.devx.com...
    >
    > hi
    > i found it's run if i clode and open connection before begintrans
    > is it must u open the connection before begintrans directlty ?
    > thanks
    >
    > "Andrew Grillage" <andrew@concresco.com.nospam> wrote:
    > >There is no clear answer to this. It depends on the loading on your

    server
    > >as to whether you open a connection and keep it open, or open and close

    > as
    > >you need. If the load on your server will not be too high then it is
    > >certainly convenient to open a connection for the duration of running

    your
    > >application and have the main form manage it.
    > >
    > >--
    > >
    > >Andrew Grillage
    > >http://www.concresco.com
    > >
    > >
    > >hammam <mhdhamam@hotmail.com> wrote in message
    > >news:390c1023$1@news.devx.com...
    > >>
    > >> hi
    > >> i have one main mdiform and may forms i ask what is the ideal way to

    open
    > >> the connection is it one time in mainform load
    > >> or open and close it in each form
    > >> thanks
    > >>
    > >>
    > >>

    > >
    > >

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center