Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    connect to firebird driver (2000 sr-1)

    is this correct to connect on firebird driver i have many error:

    Sub test_firebird()

    Dim con As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    'Dim cn As ADODB.Connection
    Set cn = New ADODB.Connection
    cn.ConnectionString = _
    "DRIVER=Firebird/InterBaseŽ driver;UID=SYSDBA;PWD=masterkey;DBNAME=c:testeempl oyee.FDB"
    rs.Open "select * from first_name", con

    Do Until rs.EOF
    Debug.Print rs.Fields(0)
    rs.MoveNext
    Loop
    rs.Close
    con.Close

    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: connect to firebird driver (2000 sr-1)

    Have you tried replacing SYSDBA and masterkey with a valid username / password combination?

    What are the errors you get?

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: connect to firebird driver (2000 sr-1)

    You have some confusion between using <code>cn</code> and using <code>con</code> - try:
    <pre>Dim con As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    Set con = New ADODB.Connection
    con.ConnectionString = _
    "DRIVER=Firebird/InterBaseŽ driver;UID=SYSDBA;PWD=masterkey;DBNAME=c:testeempl oyee.FDB"
    rs.Open "select * from first_name", con

    Do Until rs.EOF
    Debug.Print rs.Fields(0)
    rs.MoveNext
    Loop
    rs.Close
    con.Close

    End Sub
    </pre>


    HTH.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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