473,698 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: Invalid PInvoke metadata format

Hi,

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

Additional information: Invalid PInvoke metadata format

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

This is piece of code:

string connectionStrin g =
"User=SYSDB A;" +
"Password=maste rkey;" +
"Database=test2 .fdb;" +
"DataSource=loc alhost;" +
"Port=3050; " +
"Dialect=3; " +
"Charset=NO NE;" +
"Role=;" +
"Connection lifetime=15;" +
"Pooling=tr ue;" +
"Packet Size=8192";
FbConnection myConnection = new FbConnection(co nnectionString) ;

myConnection.Op en();

Thanx

gacu

Nov 16 '05 #1
2 2503
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.co m

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

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

Additional information: Invalid PInvoke metadata format

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

This is piece of code:

string connectionStrin g =
"User=SYSDB A;" +
"Password=maste rkey;" +
"Database=test2 .fdb;" +
"DataSource=loc alhost;" +
"Port=3050; " +
"Dialect=3; " +
"Charset=NO NE;" +
"Role=;" +
"Connection lifetime=15;" +
"Pooling=tr ue;" +
"Packet Size=8192";
FbConnection myConnection = new FbConnection(co nnectionString) ;

myConnection.Op en();

Thanx

gacu

Nov 16 '05 #2
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4013
by: muser | last post by:
Can anyone run this program through their compiler or if they can see a logical error please point it out. I have my tutor working on it at the moment but I would rather a less ambigious response than the one I think he will provide. The test data, A:\\"514650.txt", appears at the end of the program. The problem is that the program won't read this file and the debugger as far as i know how to work it won't point out the mistake of any....
0
2313
by: Craig Watt | last post by:
Please Help! I have an XML File using the DataPacket standard (am working with Delphi/Informix poeple): <?xml version="1.0" standalone="yes"?> <DATAPACKET version="2"> <METADATA> <FIELDS> <FIELD attrname="row_id" fieldtype="i8" />
0
2482
by: Claire | last post by:
Hi Ive been using Mattias Sjögren's example at http://www.msjogren.net/dotnet/eng/samples/dotnet_dynpinvoke.asp to load an unmanaged 3rd party dll dynamically when my object is created. Calling the "CreateDllAssembly" function below does this. When my wrapper is disposed of, I want the dll to be unloaded from memory. See the "dispose" function below. All seems to work ok on the first instance of my wrapper class. (I only
11
2690
by: Steve Hoyer | last post by:
I am trying to deploy my first asp.net app to our webserver (2K server, IIS 5) My start page comes up and you can get to the subsequent pages that are tied into our sql server (2K). Each page has a datagrid that loads up just fine, but when I click on any link that updates the page, i.e. a column header to sort the database, it returns a 404 error. Any ideas why it works the for the inital load and not on a postback?
0
991
by: Don Lopez | last post by:
I get this exception when I try to run open on the MySQLConnection object. It goes like this: System.TypeLoadException: Invalid PInvoke metadata format. at System.Net.OSSOCK.gethostbyname(String host) at System.Net.Dns.GetHostByName(String hostname) at ByteFX.Data.Common.StreamCreator.GetStream(Int32 timeOut) at ByteFX.Data.MySqlClient.Driver.Open(MySqlConnectionString settings) --- End of inner exception stack trace --- at...
1
1564
by: Miku | last post by:
Hi Guies, I am new to vb.net. In my project I am using vb.net & MySql 4.0.17 as a backend. For database connectivity i have downloaded ByteFX - Mysql .net native provider. I have written the following code to connect with database: Imports ByteFX.Data.MySqlClient
0
23489
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
1
1553
by: keerthikarani | last post by:
hi, I m using the following code in vb.net, but it shows me some error, can u explain why this error occurs and how to rectify it, but the following code works fine in vb Private Declare Function SQLDataSources Lib "odbc32.dll" _ (ByVal hEnv As Long, _ ByVal fDirection As Integer, _ ByVal szDSN As String, _ ByVal cbDSNMax As Integer, _ ByVal pcbDSN As Integer, _
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.