Reputation: 9080
My local computer is 64 bit but the downloads for the .Net mySql connector found here: http://dev.mysql.com/downloads/connector/net/ are 32 bit. I installed the 32 bit file however, whenever I try to input any new connector information after the 1st keystroke the box disappears. So I'm assuming that it has more to do with my machine being 64 bit rather than 32... Is there a 64 bit version of this connector? Any other ideas?
UPDATE:
It is the Add a Connection box.
After I enter anything into any of the textboxes the above box just disappears. Any ideas?
Upvotes: 0
Views: 13829
Reputation: 36
It appears that your problem is due to a corrupt install of MySQL connector for .Net as described on MySQL website. http://bugs.mysql.com/bug.php?id=23071
Their recommendation is to manually add the missing MySQL Data Provider entries in the Machine.config under DbProviderFactories section.
You could always try and un-install and re-install if you haven't tried that already.
Upvotes: 2
Reputation: 9080
OK, I'm going to answer this question and then close it as although I couldn't get the real fancy Microsoft way of adding a datasource I did it the old fashioned way. Not the super nice way but this was just me learning, so after you see this example please know that I'm a long way off still.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using MySql.Data.MySqlClient;
namespace MyFitnessApp
{
public partial class _Default : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
MySqlConnection mss = new MySqlConnection("server=IP Address;Port=####;Database=db_name;Uid=userId;Pwd=password;");
string strSQL = "";
strSQL = "SELECT * FROM TABLE;";
MySqlDataAdapter mda = new MySqlDataAdapter(strSQL,mss);
DataSet myDS = new DataSet();
mda.Fill(myDS,"TABLE");
this.GridView1.DataSource = myDS;
this.GridView1.DataBind();
}
}
}
}
I'd like to figure out how to call the connectionstring from the web.config but this is what I found in several examples.
What is ironic is that I'm much more comfortable in VB.Net and I'm learning C#. The example I found was written in VB.Net and I converted it to C#. (:
Upvotes: 1