472,328 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

Getting Error : Invalid PInvoke metadata format. while accessing mysql through Bytefx .net native provider

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

I have written the following code to connect with database:

Imports ByteFX.Data.MySqlClient
Imports System.Data
Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()

'This call is required by the Windows Form Designer.

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
If disposing Then
If Not (components Is Nothing) Then
End If
End If
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub
Me.Button1 = New System.Windows.Forms.Button()
Me.Button1.Location = New System.Drawing.Point(64, 128)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.AddRange(New System.Windows.Forms.Control()
Me.Name = "Form1"
Me.Text = "Form1"

End Sub

#End Region

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim strConString As String
strConString = "Database=sona;server=localhost;uid=;pwd=;"
Dim con As New MySqlConnection(strConString)
End Sub
End Class

When i run my application i get error at con.open() line as below:

An unhandled exception of type 'System.TypeLoadException' occurred in

Additional information: Invalid PInvoke metadata format.

Pl. Help me out.

Ban Miku
Nov 22 '05 #1
1 1455
Hi Miku,

Ask this also in the newsgroup


There is someone active in that newsgroup who loves PInvoke.

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Dirk Reske | last post by:
Hello, I'm using the bytefx.data library to connect to a mysql server: string ConnectionString = "Server=localhost;Database=test;User...
by: Muscha | last post by:
Hi, What is the best way to access mySql from C#? Anyone has a good suggestion about for a good data provider? Thanks, /m
by: Gacu | last post by:
Hi, An unhandled exception of type 'System.TypeLoadException' occured in system.dll Additional information: Invalid PInvoke metadata format ...
by: Tim Bücker | last post by:
Hello. I am trying to get a connection to MySQL using OleDb but it seems that I am making something wrong. I´ve found this source in the net but...
by: John Smith | last post by:
I know that uploading an image to a database has been covered, oh, about 3 trillion times. However, I haven't found anything covering uploading to...
by: Jassim Rahma | last post by:
Hi, How can I directlly connect to mySQL server from C# without an ODBC drive? connecting through ODBC means I have to include mySQL...
by: Steven Caliendo | last post by:
Hi, I have a MySQL database on a remote server that I need to connect to. I can't seem to figure out what the connectionstring should be? I've...
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...
by: asadikhan | last post by:
Hi, I am trying to configure my asp.net application to work with MySQL using Connector/NET and I wish to use connection pooling. What is the...
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.