1 connection or many?

[b][red]This message was edited by f00sion at 2003-5-23 9:41:22[/red][/b][hr]
I am working on a pretty big app that is constantly doing different database tasks. Would it be better to have 1 adodb connection for the entire application to use or to create and destroy a connection in each time and function that it is needed? I do most programming in asp so I am very used to creating the connections and closing them right away if they aren't needed... maybe a bad habbit for use in visual basic? Any suggestions?
Also, I am currently using dsn-less connections, any advantages or disadvantages to that over using a dsn?

Thanks


[edit]This is accessing a sql2000 database btw.

Comments

  • oledb manteins open the connection even if you had closed it, but in a shadow way, so you don't have to worry about open connections, that's the best thing about ado, any example of asp i have ever saw, even from microsoft close the connections for each call. So there is no performance penalty for that i believe.

    Of course mantain an real open connection, keeps that of every error in you application, and makes more information to you!.

    your connection to SQL make NON dsn, there is a lot of performance downgrade, it passes for a new level, that's odbc. even when microsoft said it has odbcdirect in the years of DAO, odbc is odbc, so there is a new layer!

    sorry about my english translation!

    ========================
    : [b][red]This message was edited by f00sion at 2003-5-23 9:41:22[/red][/b][hr]
    : I am working on a pretty big app that is constantly doing different database tasks. Would it be better to have 1 adodb connection for the entire application to use or to create and destroy a connection in each time and function that it is needed? I do most programming in asp so I am very used to creating the connections and closing them right away if they aren't needed... maybe a bad habbit for use in visual basic? Any suggestions?
    : Also, I am currently using dsn-less connections, any advantages or disadvantages to that over using a dsn?
    :
    : Thanks
    :
    :
    : [edit]This is accessing a sql2000 database btw.
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion