Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Posts
    107

    Unanswered: To maintain a connection or not

    I'm developing a relatively small application that will be used by 5 - 10 people. The database will be access... which i understand is limited to 5 concurrent connections.

    Is it a good idea to create a global connection object and keep the connection open for each session or should I connect / disconnect each time a db function is called? eg. when the user provides their login criteria, I am currently connecting to the db, authenticating them, and then disconnecting. However, on the next screen that appears, I need to query their user profile to determine which modules I should / should not display. In this scenario, I think it would be better to have just maintained the initial connection...
    also, is there any good vb / access sample code available?

  2. #2
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    MS Access has not 5 users limit... the limit is 255, but I haven't seen anybody with so many connections. 5 users limit is on MSDE

    what is your front-end? Is it a web page (ASP) ?


    jiri

  3. #3
    Join Date
    Feb 2003
    Posts
    107

    Front end

    the front end will be vb forms. but in the future, i plan to rewrite the front end in ASP.
    does it make a difference ?
    Also re: 5 users... yes.. you're right - it supports up to 255 simultaneous users. No more than 25 recommended is what I read.

    thanks.

  4. #4
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    if you plan to use VB and in the future ASP, forget Access NOW and use MSDE.

    Why?

    1. If you will have more users in the future, you will easily upgrade to SQL server

    2. if you plan to use different front end, create all main database functions on the server as stored procedures and extended stored procedures. Then you don't care so much about the front end, because all DELETEs, APPEND, MODIFY and other stuff is error-checked and proved on the SQL server (all your CHECK constr. and other LOGIC is written just once).


    SQL server does not have problems with many opened connections, so if you don't plan app for 5000 users, keep it opened. Initial hanshake is short, but still it takes sometimes few seconds....


    jiri

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •