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=75405 --- shadow/75405 2005-06-28 08:05:23.000000000 -0400 +++ shadow/75405.tmp.2169 2005-06-28 08:05:23.000000000 -0400 @@ -0,0 +1,73 @@ +Bug#: 75405 +Product: Mono: Class Libraries +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: Sys.Data.SqlClient +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Problem with SQLServer GUID parameters + +I've an issue with MSSQL Server and mono... +I just do a select * where [EMAIL PROTECTED] +and fiche_id is a Guid parameters... MS.NET return something, mono returns +nothing; +here's my code : +(do an insert with a name and a guid primary key before) +class MainClass +{ + static string cnx="packet size=4096;user id=sa;password=sa;data +source=10.69.100.93;persist security info=false;initial +catalog=Fiche_Produit"; + + + public static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + string requete="SELECT * FROM FICHE"; + SqlCommand cmd=new SqlCommand(); + SqlDataAdapter dta=new SqlDataAdapter(cmd); + DataSet ds=new DataSet(); + cmd.Connection=new SqlConnection(cnx); + cmd.CommandText=requete; + dta.Fill(ds,"fiche"); + Console.WriteLine("Select effectué"); + Console.WriteLine(ds.DataSetName); + foreach (DataColumn col in ds.Tables["fiche"].Columns) + { + Console.WriteLine(col.ColumnName); + } + Guid found=Guid.Empty; + foreach (DataRow row in ds.Tables["fiche"].Rows) + { + Guid id=(Guid)row["FICHE_ID"]; + string titre=(string)row["FICHE_TITRE"]; + + Console.WriteLine("ID :"+ id.ToString()+ " : "+titre); + if (titre=="essai") + { + Console.WriteLine("Fiche Trouvée"); + found=id; + } + } + SqlCommand sqlc=new SqlCommand(); + sqlc.CommandText= @"SELECT * FROM Fiche + WHERE + [EMAIL PROTECTED]"; + sqlc.Parameters.Clear(); + sqlc.Parameters.Add("@fiche_id",SqlDbType.UniqueIdentifier).Value=found; + sqlc.Connection=new SqlConnection(cnx); + dta=new SqlDataAdapter(sqlc); + ds=new DataSet(); + dta.Fill(ds,"fiche"); + Console.WriteLine(ds.Tables["fiche"].Rows.Count); + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
