I have a program which connects to a remote MySQL Server. When i try running the program on other PCs (ones with nothing more than the .NET Framework)

I tried using ODBC, which would run the program, but not be able to connect to the database because of the lack of the Driver.
I just switched to using the MySQL Connector/NET, but that had an error on startup (I think it was b/c it couldn't find a file)
I hear that Oledb has good compatibility, but I believe it will only work on a local database.

Is there a way to connect to MySQL that will work on 'most' PCs?

>Is there a way to connect to MySQL that will work on 'most' PCs?

MySQL Connectors!!!. MySQL Connector/Net is a fully managed ADO.NET provider for MySQL.

MySQL Connectors!!!. MySQL Connector/Net is a fully managed ADO.NET provider for MySQL.

I'm currently using that, but when i run it on my target PC, it brings up a system.io.filenotfound exception, which at first sounded a bit like the error that ODBC would give because of a missing driver, but it now looks a bit... weird.
Does it matter that my target framework is 2.0, and not higher, or will i need to install something first?
The computer i'm testing it on is windows XP with visual studio VB.NET express installed, but it doesn't have ODBC or the MySQL Connector/NET installed.
Oh and also, it works perfectly while it runs on my own machine.

EDIT: after going through your link, it mentions it is a 'driver'. Does this mean i'll have to install the Connector/NET on all machines that will run the program?

>it mentions it is a 'driver'.

Driver is a computer program allowing higher-level computer programs to interact with a another computer program. Connector/NET is a fully managed ADO.NET driver written in 100% pure C#.

>Does this mean i'll have to install the Connector/NET on all machines that will run the program?

Yes.

So, there is no way of connecting to MySQL without use of a driver, that isn't installed to Windows or .NET by default? Could I include the driver like a resource? (I don't know much about drivers)

>So, there is no way of connecting to MySQL without use of a driver

Yes.

>Could I include the driver like a resource?

You need to run the Mysql.Data connecetor installer before your installation. You can call an executable as a custom action (setup/deployment) or you can do it with the System.Diagnostics.Process.Start().

OK, thanks for all of your help, i'll now mark this thread as solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.