Results 1 to 3 of 3

Thread: Best way to connect to db?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Best way to connect to db?

    What's considered the best way to declare db connections? Declare them global in a module, so they're available everywhere, but always in memory, or declare them in each sub & function, increasing overhead but saving memory? Or declaring them in a module, but instantiating in each sub?
    It may not be a big savings either way, but I have to deal with some machines that only have 32 mb ram. And I just like cleaner, more efficient code. Thanks.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Check out Microsoft's Application Programming Blocks (I think that's what they are called - and I don't have a link handy). One of the blocks available is a db connection management piece, you jsut supply a couple of pieces of data and it takes care of creating the connection for you. I haven't used it personaly, but I've heard good things about it.

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    I've looked at that, but I think it says you need VS 2003, and I have 2002.

Posting Permissions

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



Click Here to Expand Forum to Full Width