Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77785 --- shadow/77785 2006-03-14 10:52:34.000000000 -0500 +++ shadow/77785.tmp.20477 2006-03-14 11:04:26.000000000 -0500 @@ -161,6 +161,54 @@ ------- Additional Comments From [EMAIL PROTECTED] 2006-03-14 06:06 ------- Actually we need to restart mod_mono when PostGreSQL is restarted... It's not a very good behaviour! (I think) ------- Additional Comments From [EMAIL PROTECTED] 2006-03-14 10:52 ------- This is a System.Data bug, not System.Web + +------- Additional Comments From [EMAIL PROTECTED] 2006-03-14 11:04 ------- +I don't think so... +This behaviour is normal (System.data don't check if the connection is +really open (on a tcp database view) before launching query) + +Example : +using System.Data.SqlClient; +using Npgsql; + +class MainClass +{ + static string cnxstring="Server=10.69.100.92;Port=5432;User +Id=postgres;Password=postgres;Database=intranet;pooling=true;Encoding=UNICODE"; + public static void Main(string[] args) + { +select_test(cnxstring); + } + + private static void select_test(string cnxString) + { + + NpgsqlConnection pgcnx = new NpgsqlConnection(cnxString); + NpgsqlCommand pgcmd = new NpgsqlCommand(); + + pgcmd.Connection = pgcnx; + + pgcmd.CommandText = @"SELECT * FROM intra_utilisateur"; + NpgsqlDataAdapter dta=new NpgsqlDataAdapter(pgcmd); + + DataSet ds=new DataSet(); + pgcnx.Open(); + dta.Fill(ds); + Console.WriteLine("1ere Query effectuée"); + Console.ReadLine(); + +/// Here, restart the database + + Console.WriteLine(pgcnx.State); + dta.Fill(ds); + pgcnx.Close(); + } + + } + +This Fails, on MS.NET and on Mono... + +So, we MUST check in SQLSessionHandler the "real" connection state _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
