Results 1 to 2 of 2

Thread: Referencing ADO Connection

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Posts
    19

    Referencing ADO Connection

    I have an ADO connection to my SQL server. I'm trying to figure out how to reference this connection in other parts of the program to run stored procedures, populate grids, etc. I'm pretty sure that this is possible, I just can't find a good example. Any help would be greatly appreciated.

  2. #2
    nullus
    Guest
    just use the name of the object variable

    VB Code:
    1. Dim con As ADODB.Connection
    2. Set con = New ADODB.Connection
    3.  
    4. con.Open "blah blah"
    5.  
    6. rst.Open "select blah blah...", con, adOpenStatic, adLockOptimistic

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