Hello,

I'm new to Firebird, and having a frustrating time with the connection 
string... or simply connecting to the database.

I have tried various ways of connecting (searching via Google) to a firebird 
database -embedded- and I just can't seem to get the connection string correct. 
Such as:

Using conn As New FbConnection( "Server=localhos t;User=SYSDBA; Password= 
masterkey; Database= C:\data\MyData. fdb")
conn.Open()
End Using

-ANOTHER-STYLE-

Dim connectionString As String = "User=SYSDBA; " & "Password=masterkey ;" & 
"Database=MyData. fdb;" & "DataSource= localhost; " & "Port=3050;" & 
"Dialect=3;" & "Charset=NONE; " & "Role=;" & "Connection lifetime=15; " & 
"Pooling=true; " & "MinPoolSize= 0;" & "MaxPoolSize= 50;" & "Packet Size=8192;" 
& "ServerType= 1"

-ANOTHER-STYLE-

Dim connectionString As String = String.Format( "User=SYSDBA; Password= 
masterkey; Database= MyData.fdb; ServerType= 1")

Dim myConnection1 As New FbConnection( connectionString )
myConnection1. Open()

----------

I must have tried at least a dozen different ways and all of them have failed. 
The last two -above- fail with a 'BadImageFormatException' within a Try Catch 
block.

What is the correct way to format a connection string? I have tried posted 
variations of the stringbuilder, but it too fails,

Is there a 'local' shorter version for the connection string to an embedded 
database?

For instance SQLCE uses |DataDirectory| \MyDatabase.sdf... where you don't have 
to give the full path.

I believe I have all of the dll's in place... fbembed, icuuc30, icudt30, 
icuin30; now that I am writing this I remember something about fbclient... 
sigh... 

Win7 64bit, 3.5 SP1 framework, VS2008 vb.net, 2.5RC1 Firebird provider 32bit 
(IBExpert and EMS require the 32bit provider to work with - actually those are 
in the app debug folder too now that I think of it),

Can I include both the 32 and 64 bit dll's in the app folder?


Thanks
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to