Subject | Re: [firebird-support] Calling Firebird from Excel? |
---|---|
Author | Maury Markowitz |
Post date | 2012-05-02T22:20:51Z |
On 2012-05-02, at 5:59 PM, Bart Smissaert wrote:
Const cnn = "Driver={Firebird/InterBase(r) driver};Dbname=c:\Program Files\Fishbowl\database\data\AS SOLAR.FDB;UID=XXX;PWD=YYY;"
Public conn As ADODB.Connection
Sub OpenDBConnection()
If conn Is Nothing Then
Set conn = New ADODB.Connection
End If
If conn.State = 0 Then
conn.Open cnn
End If
End Sub
Happens right on the conn.open. I assume it's a problem in the cnn string, but what? I tried {}'s around the dbname, no luck.
The connection to the DB works when I use ODBC. I have a DSN pointed to it as well, but when I try to use the DSN based cnn it doesn't work and gives me two errors :-)
Const cnn = "ODBC;DSN=Fishbowl;UID=XXX;PWD=YYY;"
> Post your code and tell where you get the error.Yeah, normally is simple. Just wish the error was more descriptive!
> Should be something simple
Const cnn = "Driver={Firebird/InterBase(r) driver};Dbname=c:\Program Files\Fishbowl\database\data\AS SOLAR.FDB;UID=XXX;PWD=YYY;"
Public conn As ADODB.Connection
Sub OpenDBConnection()
If conn Is Nothing Then
Set conn = New ADODB.Connection
End If
If conn.State = 0 Then
conn.Open cnn
End If
End Sub
Happens right on the conn.open. I assume it's a problem in the cnn string, but what? I tried {}'s around the dbname, no luck.
The connection to the DB works when I use ODBC. I have a DSN pointed to it as well, but when I try to use the DSN based cnn it doesn't work and gives me two errors :-)
Const cnn = "ODBC;DSN=Fishbowl;UID=XXX;PWD=YYY;"