|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Dears!!
i'm have a problem, iím user monodevelop + mysql (althought bytefxdata), but no connection ... using System; using System.Text; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; using System.IO; using System.Data; using ByteFX.Data.MySqlClient; using ByteFX.Data.Common; using Npgsql; using Mono.Data; using Gtk; public partial class MainWindow: Gtk.Window { private string conexao; private ByteFX.Data.MySqlClient.MySqlConnection link_conexao; void carrega_dados() { conexao="Database=db;Server=127.0.0.1;User Id=root;Password=123"; //conexao = "Database=db;Data Source=localhost;User Id=root;Password=123"; try { link_conexao=new ByteFX.Data.MySqlClient.MySqlConnection(conexao); //MessageBox.Show("conectou"); } catch(Exception ex)// (MySqlConnection error) { MessageBox.Show("erro no banco"); } } void consulta_banco() { //MessageBox.Show("oi"); string pega_senha = "SELECT senha FROM tbadm_agenda"; link_conexao.Open(); ByteFX.Data.MySqlClient.MySqlDataAdapter adap_senha= new MySqlDataAdapter(pega_senha,link_conexao); adap_senha.SelectCommand.CommandText=pega_senha; ByteFX.Data.MySqlClient.MySqlCommandBuilder const_senha= new ByteFX.Data.MySqlClient.MySqlCommandBuilder(adap_s enha); DataSet ds_senha=new DataSet(); adap_senha.Fill(ds_senha,"senha"); string senha=""; //MessageBox.Show("ora ora9"); senha=Convert.ToString(ds_senha.Tables["senha"].Rows[0]["senha"]); //MessageBox.Show("ora ora10"); link_conexao.Close(); //MessageBox.Show("ora ora11"); MessageBox.Show(senha); //link_conexao.Close(); } public MainWindow (): base (Gtk.WindowType.Toplevel) { Build (); carrega_dados(); } protected virtual void OnButton1Clicked (object sender, System.EventArgs e) { MessageBox.Show("janela","oi"); consulta_banco(); } //protected void OnDeleteEvent (object sender, DeleteEventArgs a) //{ //Application.Quit (); //a.RetVal = true; //} } ************************************************** ************************************************** **** now the error message, later compiled ************************************************** ************************************************** **** i'm have references exists...in the windows too .................................................. ................. Now the error .................................................. ............... quipus@linux-1cnf:~/Desktop/monitora/m1/m1/bin/Debug> mono m1.exe Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. ByteFX.Data.MySqlClient.MySqlException: Client does not support authentication p rotocol requested by server; consider upgrading MySQL client at ByteFX.Data.MySqlClient.Driver.ReadPacket () [0x00000] at ByteFX.Data.MySqlClient.Driver.Authenticate (System.String userid, System.S tring password, Boolean UseCompression) [0x00000] at ByteFX.Data.MySqlClient.Driver.Open (ByteFX.Data.MySqlClient.MySqlConnectio nString settings) [0x00000] at ByteFX.Data.MySqlClient.MySqlInternalConnection.Op en () [0x00000] at ByteFX.Data.MySqlClient.MySqlPool.CreateNewPooledC onnection () [0x00000] at ByteFX.Data.MySqlClient.MySqlPool.GetPooledConnect ion () [0x00000] at ByteFX.Data.MySqlClient.MySqlPool.GetConnection () [0x00000] at ByteFX.Data.MySqlClient.MySqlPoolManager.GetConnec tion (ByteFX.Data.MySqlCl ient.MySqlConnectionString settings) [0x00000] at ByteFX.Data.MySqlClient.MySqlConnection.Open () [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(Syst em.Exception e, Boolean is_terminal) at GLib.Signal.voidObjectCallback(IntPtr handle, IntPtr data) at GLib.Signal.voidObjectCallback(IntPtr , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at m1.MainClass.Main(System.String[] args) quipus@linux-1cnf:~/Desktop/monitora/m1/m1/bin/Debug> HELP ME PLEASE!!! my e-mail is : edgardx3w@gmail.com and my msn: edgard_t@hotmail.com thanks |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|