This article describes how to use a DSN-less connection that connects to an InterBase database from Visual Basic or VBA by using the Easysoft ODBC-InterBase Driver.
Dim con As New ADODB.Connection
con.Open "Driver={Easysoft Interbase ODBC};" _ & "Database=myinterbaseserver:c:\myinterbasedatabase.gdb;" _ & "UID=myinterbaseusername;PWD=myinterbaseusername"
For more information about the Easysoft ODBC-InterBase Driver attributes that you can specify in the Open methods ConnectionString argument, see the Easysoft ODBC-InterBase Driver documentation.
Dim rs As New ADODB.Recordset rs.Open "select column from mytable", con Do Until rs.EOF Debug.Print rs.Fields(0) rs.MoveNext Loop
rs.Close con.Close
Note When you close a connection in ADO, the connection will only close in your program. ADO will keep the connection alive in case you choose to connect again.