[Mono-bugs] [Bug 57779][Maj] New - MySqlClient DataAdapter not returning all the rows

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 28 Apr 2004 11:10:13 -0400 (EDT)


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 baenapablo@hotmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=57779

--- shadow/57779	2004-04-28 11:10:13.000000000 -0400
+++ shadow/57779.tmp.5267	2004-04-28 11:10:13.000000000 -0400
@@ -0,0 +1,134 @@
+Bug#: 57779
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Debian testing
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: baenapablo@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MySqlClient DataAdapter not returning all the rows
+
+The table being queried has a lot of records, and the
+datagrid only shows one, I'm using mono from CVS as of
+2003/04.
+
+I don't know if this is a Mono problem or a problem on the MySqlClient dll. 
+
+<%@ Import Namespace="System.Data" %>
+<%@ Assembly Name="ByteFX.Data" %>
+<%@ Import Namespace="ByteFX.Data.MySqlClient" %>
+
+
+<html>
+<script language="C#" runat="server">
+
+void BindGrid() {
+string connectionString =
+"server=localhost;database=roca;user id=root;password=;";
+
+MySqlConnection dbcon;
+dbcon = new MySqlConnection(connectionString);
+dbcon.Open();
+
+string sql = "SELECT numero, nombre " +
+"FROM clietest";
+
+MySqlDataAdapter adapter = new
+MySqlDataAdapter(sql, dbcon);
+DataSet dataset = new DataSet ();
+adapter.Fill (dataset);
+MyDataGrid.DataSource = dataset;
+MyDataGrid.DataBind();
+ShowStats();
+}
+
+void Page_Load(Object sender, EventArgs e) {
+if (chk1.Checked) {
+
+MyDataGrid.PagerStyle.Mode=PagerMode.NumericPages;
+}
+else {
+MyDataGrid.PagerStyle.Mode=PagerMode.NextPrev;
+}
+
+BindGrid();
+}
+
+void MyDataGrid_Page(Object sender,
+DataGridPageChangedEventArgs e) {
+MyDataGrid.CurrentPageIndex = e.NewPageIndex;
+BindGrid();
+}
+
+void ShowStats() {
+lblCurrentIndex.Text = "CurrentPageIndex is " +
+MyDataGrid.CurrentPageIndex;
+lblPageCount.Text = "PageCount is " +
+MyDataGrid.PageCount;
+}
+
+
+</script>
+
+<body>
+
+<h3><font face="Verdana">Basic Paging with
+DataGrid</font></h3>
+
+<form runat=server>
+
+<ASP:DataGrid id="MyDataGrid" runat="server"
+AllowPaging="True"
+PageSize="10"
+PagerStyle-Mode="NumericPages"
+PagerStyle-HorizontalAlign="Right"
+PagerStyle-NextPageText="Next"
+PagerStyle-PrevPageText="Prev"
+OnPageIndexChanged="MyDataGrid_Page"
+BorderColor="black"
+BorderWidth="1"
+GridLines="Both"
+CellPadding="3"
+CellSpacing="0"
+Font-Name="Verdana"
+Font-Size="8pt"
+HeaderStyle-BackColor="#aaaadd"
+AlternatingItemStyle-BackColor="#eeeeee"
+/>
+
+<p>
+<asp:Checkbox id="chk1" runat="server"
+Text="Show numeric page navigation buttons"
+Font-Name="Verdana"
+Font-Size="8pt"
+HeaderStyle-BackColor="#aaaadd"
+AlternatingItemStyle-BackColor="#eeeeee"
+/>
+
+<p>
+<asp:Checkbox id="chk1" runat="server"
+Text="Show numeric page navigation buttons"
+Font-Name="Verdana"
+Font-Size="8pt"
+AutoPostBack="true"
+/>
+
+<p>
+<table bgcolor="#eeeeee" cellpadding="6"><tr><td
+nowrap><font face="Verdana" size="-2">
+<asp:Label id="lblCurrentIndex" runat="server"
+/><br>
+<asp:Label id="lblPageCount" runat="server" /><br>
+</font></td></tr></table>
+</form>
+
+</body>
+</html>