Results 1 to 2 of 2

Thread: Multiple Usage but Single Connection

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    Hyd - INDIA
    Posts
    57

    Red face

    Hello guys, To start off with the scenario where i am facing a problem ...

    I validate a user and give him access to a particular server with a database.. [ we have multiple serv/dbs ].

    In the form where i validate him i make a connection to the database and check for his permissions.. Here i am making a connection to the database..

    Now i have many forms which amount upto 20+ where i am checking for some conditional statements by again connecting to the database..This process will be very slow..Since we have already made a connection to the database starting can i use the same connection across all my forms..Doing this will leave the burden of connecting each time to check some validtions....

    GUYS i need to know if there is any way where i can use a single connection string which can serve me in all of my forms...

    YOUR FEEDBACKS ARE REALLY APPRECIATED...THANX ! !

  2. #2
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    U don't have to connect each time to the server /Db. You can declare a Public connection object in a module so the connection object is available through out the program...

    Hope this helps
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

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