hello there,       I have just got started with 
mono and having a trouble connecting with Mysql 5.0..It seems it can\'t find 
the driver needed.I have mysql connector/.net 1.0.9....but can\'t get that 
working.I read somewhere mono needs 1.0.7 of that connector ,but I can\'t find 
that version anywhere.Can anyone please tell me which driver to use and a 
sample code snippet to connect to mysql.Now I am using the sample snippet given 
in the MONO official site 
:-****************************************************************************************using
 MySql.Data.MySqlClient;using MySql.Data;public class Default : 
Page    {        
        public virtual void onButtonClick(object 
sender, EventArgs e)        {    
        string connectionString 
=\"Server=localhost;\" + \"Database=test;\" + \"User ID=root;
 \" + \"Password=mysql;\" + 
\"Pooling=false\";       IDbConnection 
dbcon;       dbcon = new 
MySqlConnection(connectionString);       
dbcon.Open();       IDbCommand dbcmd = 
dbcon.CreateCommand();      
       string sql 
=           \"SELECT name, 
age \" + \"FROM table1\";       dbcmd.CommandText 
= sql;       IDataReader reader = 
dbcmd.ExecuteReader();       while(reader.Read()) 
{            string name 
= (string) 
reader[\"name\"];           
 string age = (string) 
reader[\"age\"];           
 Response.Write(\
 "Name :- \"+name+\"Age :- \"+age);       
}       // clean 
up       
reader.Close();       reader = 
null;       
dbcmd.Dispose();       dbcmd = 
null;       
dbcon.Close();       dbcon = 
null;            
Response.Write(\"Hello\");        
            }    
}*******************************************************************************************and
 the error I am getting now is 
:-#################################################################################[Task:File=/home/rupanupal/Projects/NewTest/NewTest/Default.aspx.cs,
 Line=26, Column=20, Type=Error, Priority=Normal, Description=The type or 
namespace nam
 e `MySqlConnection\' could not be found. Are you missing a using directive or 
an assembly 
reference?(CS0246)]###################################################################################I
 have the above two references already added.What might be the issue???Please 
suggest a way.Thanking you all...R. Pal
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to