Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    2

    Unanswered: Trouble with Multiple Sybase Connections

    Hi
    i have a small problem.
    I'm trying to connect to multiple sybase databases using "ADO" Vbcode.
    But after the firest connection is opened i can't open another one eventhough i closed the connection in my code.
    I think that i don't need to close the connection only to change the connection databse location. But i don't know how.
    So please, I'm open to any suggestions.

  2. #2
    Join Date
    Jan 2004
    Posts
    5
    it would help if you posted some code.

  3. #3
    Join Date
    Jan 2004
    Posts
    2

    this is a sample code

    If Connection.Connect_ODBC(Cnn, Datasource, Password, UserId) Then
    If Connection.OpenRecordset(Rs, Query,Cn) Then
    Call Fill_Records(Grid)
    End If
    End If

    Rs.close
    Cnn.close

    where i connected to then ODBC there opened a recordset, then i filled in the grid. Then after that i closed the connection.
    So if i want to repeat this code another time in my program and open a new Connection to another Datasource, an error occurs since i can't open 2 sybase databases at the same time ( although i disconnected the connection ), the sybase connection window didn't close.

    So please what is the way to close the connection completely.

Posting Permissions

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