   Programing error C#
  hi I was hoping you could help me with programming in c# I was looking at a tutorial on the mysql web site : http://dev.mysql.com/tech-resources/articles/Beginning_MYSQL_5_with_Visual_Studio.NET_2005.pdf but get this error : The type or namespace name 'MysqlConnection' could not be found (are you missing a using directive or an assembly reference?) I added the reference: using MySql.Data; and in the project explorer under refrence to here is codeusing System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using MySql.Data; namespace test { public partial class Form1 : Form { public Form1() { InitializeComponent(); } //Load the Guest List public void LoadGuests() { try { //create a new mysqlconnection MysqlConnection mycon = new MysqlConnection("datasource=localhost ;username=root ;password=test ;database=Customer"); //create a mysql DataAdapter MySqlDataAdapter myadp = new MySqlDataAdapter("Select * from clients", mycon); //create a dataset DataSet myds = new DataSet(); //now fill and bind the DataGrid myadp.Fill(myds, "clients"); dataGrid1.DataSource = myds.Tables["clients"].DefaultView; dataGrid1.SetDataBinding(myds, "clients"); } catch (MySqlException ex) { MessageBox.Show(ex.Message); } } private void load_Click(object sender, EventArgs e) { LoadGuests(); } private void exit_Click(object sender, EventArgs e) { this.Close(); } } }    
  Did you add the appropriate assembly reference?   ;  sary but what do you mean ;Adding an assembly reference.You should add a reference to something like MySql.dll or MySdl.Data.dll or something similar.Actually, didn't you have to do this for System.Windows.Forms and System.Drawing as well?   ;  oo that yes i did but it stil doesent work ( the comands are suportes shown in the help file)   ;  Forget about what I said, you just misspelled the name. It should be MySqlConnection (note the capital S).   ;  I’m sorry but it still doesn’t work can I send the project to you???Edit: never mind you can download it at ftp://84.105.158.23/acount: guest   ;  What happens if you do this:1. Create a Bin directory in your project folder and place the file MySql.Data.dll in there.2. Add 'using MySql.Data.MySqlClient' to your C# file   ;  it works hey but can you explain why it works now withe using MySql.Data.MySqlClient;and not withe using MySql.Data;   ;Quote:Original post by precious royit works hey but can you explain why it works now withe using MySql.Data.MySqlClient;and not withe using MySql.Data;Probably because the MySqlConnection class is in the MySql.Data.MySqlClient namespace, rather than the MySql.Data namespace.  Namespaces can be nested; just because you import one namespace, it does not give you access to all the symbols defined in namespaces that are lower on the hierarchy.  If you had kept your import statement as "using MySql.Data" and referred to the connection class as MySqlClient.MySqlConnection instead of just MySqlConnection, it would have worked just as well (although that would have been more typing).   