Network Connections

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • matthewlowrance@gmail.com

    #1

    Network Connections

    We have an application that uses an access database. Some of our
    client have requested a Client /Server version that they can use over
    their wan.

    I have created a simple server that queries the database and then
    turns the dataset into xml, then sends the xml across the network and
    then the client turns the xml back into a dataset. This seemed like
    the simplest method so the application could work client/server or
    connect directly to the access database for other clients.

    The only thing I'm unsure about is just generally what is the best
    practice in a .net application, creating a single connection on the
    client side and keeping it open for the duration of the application or
    reconnecting to the server each time a new dataset would be requested
    and dispose the connection objects/let them be garbage collected?

    The server is multi threaded so it would work either way.

    If there is a better architecture I'd would be happy to hear that as
    well.

    Thanks for any help,

    Matt
  • RobinS

    #2
    Re: Network Connections

    According to database guru Bill Vaughn, in such a case as this, it doesn't
    hurt to open the connection and leave it open for the duration. You can do
    some testing and try it out and see if you have a performance hit the other
    way; my guess is that you will, just from my experience of using Access as a
    backend.

    Bill hangs out in the microsoft.publi c.dotnet.framew ork.adonet newsgroup. If
    you try searching his posts you might find the one I'm thinking of. It was
    fairly recent.

    RobinS.
    GoldMail.com

    <matthewlowranc e@gmail.comwrot e in message
    news:2209e5cd-e83d-4cf8-99d0-7a55dc394785@u7 2g2000hsf.googl egroups.com...
    We have an application that uses an access database. Some of our
    client have requested a Client /Server version that they can use over
    their wan.
    >
    I have created a simple server that queries the database and then
    turns the dataset into xml, then sends the xml across the network and
    then the client turns the xml back into a dataset. This seemed like
    the simplest method so the application could work client/server or
    connect directly to the access database for other clients.
    >
    The only thing I'm unsure about is just generally what is the best
    practice in a .net application, creating a single connection on the
    client side and keeping it open for the duration of the application or
    reconnecting to the server each time a new dataset would be requested
    and dispose the connection objects/let them be garbage collected?
    >
    The server is multi threaded so it would work either way.
    >
    If there is a better architecture I'd would be happy to hear that as
    well.
    >
    Thanks for any help,
    >
    Matt

    Comment

    Working...