hi
I started learning learning Ado.net and got a bit stuck.
1) If I enable connection statistics via SqlConnection.StatisticsEnabled property, then I should be able to retrieve various information ( via RetrieveStatistics() ) about actions SqlConnection instance performs. Thus, before calling the code below, I already opened a connection and retrieved some values from a database. That way, statistics should provide some information how commands performed. But all values retrieved from the collection return character zero (when converted to string). Any idea why that is?
...
sc.StatisticsEnabled = true;
IDictionary statistic = sc.RetrieveStatistics();
Label1.Text = statistic["BytesReceived"].ToString(); //Label1.Text displays
character”0”
2) Assuming some PC runs two Sql servers ( MySql server and MS sql server), what names would you use ( in a connection string ) to specify either of the two servers?
thank you