[Mono-list] adapter.Fill(dataset)

giobaba@freemail.it giobaba@freemail.it
Wed, 21 Jan 2004 02:47:25 +0100


Hi all, I'm new in this mailing list and I have a great problem:

I'm using Mono 0.29 (but I've tried also earlier versions, cvs and daily
builds), MySQL 4.0.17 (but I've tried also earlier versions) and ByteFX Data
Provider (the one included in Mono and also ver 0.74 and earlier versions).

My problem is that when I do "adapter.Fill(dataset)" only first two records
are stored even if table has 5,10,100,n records.
I've tested the "select" and it is working fine, so problem seems to be
located in fill method.
This is my code:

###############################################
MySqlConnection myConnection =3D new MySqlConnection();
try
{
myConnection.ConnectionString =3D "Server=3Dmyserver;database=3Dmydb;User
ID=3Dmylogin;password=3Dmypass;";
myConnection.Open();
MySqlCommand myCommand =3D new MySqlCommand("SELECT idServizio FROM TServizi
where IdPadre=3D0",myConnection);
MySqlDataAdapter adapter =3D new MySqlDataAdapter();
adapter.SelectCommand =3D myCommand;
DataSet myDs =3D new DataSet();
adapter.Fill(myDs);
Console.WriteLine("myDs.Tables[0].Rows.Count);
myConnection.Dispose();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}

###############################################

Could you help me? I've also tried to connect to MsSQL instead of MySQL and
=A0it works fine, so problem really seems to be ByteFX... is there any other
=A0data provider for mono/mysql??? Thank you in advance.