By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,595 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

Error: Invalid PInvoke metadata format

P: n/a
Hi,

An unhandled exception of type 'System.TypeLoadException' occured in
system.dll

Additional information: Invalid PInvoke metadata format

Im getting this error afrer calling myConnection.Open();
Im connecting to Firebird database (im trying in fact)
I don't know whats wrong :( Please Help.

This is piece of code:

string connectionString =
"User=SYSDBA;" +
"Password=masterkey;" +
"Database=test2.fdb;" +
"DataSource=localhost;" +
"Port=3050;" +
"Dialect=3;" +
"Charset=NONE;" +
"Role=;" +
"Connection lifetime=15;" +
"Pooling=true;" +
"Packet Size=8192";
FbConnection myConnection = new FbConnection(connectionString);

myConnection.Open();

Thanx

gacu

Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Gacu,

This sounds like a bug with the connection class. Is there more
information in the call stack that you can display that would possibly show
the error?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gacu" <ga**@poczta.onet.pl> wrote in message
news:jm******************@news.chello.at...
Hi,

An unhandled exception of type 'System.TypeLoadException' occured in
system.dll

Additional information: Invalid PInvoke metadata format

Im getting this error afrer calling myConnection.Open();
Im connecting to Firebird database (im trying in fact)
I don't know whats wrong :( Please Help.

This is piece of code:

string connectionString =
"User=SYSDBA;" +
"Password=masterkey;" +
"Database=test2.fdb;" +
"DataSource=localhost;" +
"Port=3050;" +
"Dialect=3;" +
"Charset=NONE;" +
"Role=;" +
"Connection lifetime=15;" +
"Pooling=true;" +
"Packet Size=8192";
FbConnection myConnection = new FbConnection(connectionString);

myConnection.Open();

Thanx

gacu

Nov 16 '05 #2

P: n/a
Hi Nicholas,

You are right. I've reinstalled .net data provider for Firebird. I had
provider for
..net framework 1.1 version
now I have provider for
..net framework 1.0 version

It works now! :) That's strange because I got 1.1 .net framework installed
for sure. Maybe something is wrong with my system.

Thanx.
gacu
Gacu,

This sounds like a bug with the connection class. Is there more
information in the call stack that you can display that would possibly show the error?

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.