Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6105265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:57:27+00:00 2026-05-23T13:57:27+00:00

We have a dot net 2.0 based C# product which uses Mysql as the

  • 0

We have a dot net 2.0 based C# product which uses Mysql as the data storage. When we install the mysql connector 6.3.6 on the XP/Win 7 machine, we are able to connect to the database from the C# code without any issues. But we are facing a problem while connecting to the mysql database when the mysql connector is actually not installed on the machine but is just present in the same directory as the executable. We don’t want to install the connector on each and every machine we want the product to run on. We want the connectory dll to be used directly as we use any 3rd party dll (e.g logger) in our code.

Even when we copy the mysql.data.dll into the same directory where the exe is installed, it builds but does not connect to the database.

The error given is

Unable to find the requested .Net Framework Data Provider. It may not be installed
Blockquote

Technical Information:

  • Mysql 5.0
  • C#
  • Dot Net framework 2.0
  • Mysql Connector 6.3.6 (same problem occurs with ver 6.0.3 of sql connector)
  • Win XP/Win 7

When we are using ASP.Net, we can specify the tag given below into the web.config, and we can connect to mysql database directly by putting the dll into the bin directory


<system.data>
  <DbProviderFactories>
    <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.0.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
  </DbProviderFactories>
</system.data>

Why can’t we do the same thing in the C# for the Client Server application in the desktop environment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:57:28+00:00Added an answer on May 23, 2026 at 1:57 pm

    Try something like this (I didn’t check any possible versions/configurations, but it works currently on my Vista x64 for MySql some 5.5… and .net connector 6.4.3.0 – using mysql.data.dll for v4 from .net/mono download).

    Make sure the referenced mysql.data.dll assembly below is in your current directory.

    using(var dt = new DataTable()) {
        dt.Columns.Add("Name");
        dt.Columns.Add("Description");
        dt.Columns.Add("InvariantName");
        dt.Columns.Add("AssemblyQualifiedName");
        dt.Rows.Add("Mysql something", 
            "mysql more", 
            "mysqlClient",
            "MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.4.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d");
    
        var f = DbProviderFactories.GetFactory(dt.Rows[0]);
        using(var conn = f.CreateConnection()) {
            conn.ConnectionString = "your string here";
            conn.Open();
            // and do your work here.
            Console.WriteLine(conn);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dot net windows service project which contains multiple services. This has
Does dot net have an interface like IEnumerable with a count property? I know
I have a dll that contains a dot net assembly - common intermediate language.
I have a Word 2003 .dot template that changes its menu based on the
We have an old project that requires occasional maintenance that uses VS2003 and Dot
I have a dot net nuke site that I have written a custom module
Technology: Dot Net, ASP.Net We have articles stored in XML repository and article contains
I am trying to install dot net nuke in my local system (windows XP).
I have a python script that calls a USB-based data-acquisition C# dotnet executable. The
I have a python script that calls a USB-based data-acquisition C# dotnet executable. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.