Page 1 of 1

Error with MySqlDataTable and a SELECT with INNER JOIN

Posted: Mon 28 May 2007 15:37
by Massimo
i have this select command:

SELECT comune.*, azienda.* FROM azienda
INNER JOIN comune ON comune.id = azienda.id_comune

in my c# code:

oElenco = new MySqlDataTable(cSelect, VariabiliGlobali.oConn);
oElenco.FetchAll = false;
oElenco.Active = true; --------->

i receive this error:

System.NullReferenceException ........
in CoreLab.Common.DbDataTable.CreateColumns()


The table structure:

CREATE TABLE `comune` (
`id` int(10) NOT NULL auto_increment,
`cap` varchar(5) NOT NULL default '',
`prov` char(2) NOT NULL default '',
`desccomune` varchar(40) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `desccomune` (`desccomune`)
) TYPE=InnoDB;

CREATE TABLE `azienda` (
`id` int(11) NOT NULL auto_increment,
`DescAzienda` varchar(50) NOT NULL default '" "',
`Indirizzo` varchar(50) default '" "',
`Id_Comune` int(11) default '0',
`Telefono` varchar(20) default '" "',
`Fax` varchar(20) default '" "',
`EMail` varchar(100) default '" "',
`Web` varchar(100) default '" "',
`CodiceFiscale` varchar(16) default '" "',
`PartitaIva` varchar(11) default '" "',
PRIMARY KEY (`id`)
) TYPE=InnoDB;


Thanks,
Massimo

Posted: Tue 29 May 2007 07:34
by Alexey
We are investigating this problem.
You will be notified on results as soon as possible.

Posted: Fri 01 Jun 2007 14:31
by Alexey
We have fixed this problem.
What version of MySQLDirect .NET do you use?

Posted: Mon 04 Jun 2007 09:34
by Massimo
I use MySql Direct.NET version 4.0.9.0 ,MySql Developer Tools version 2.0.19.0 and MySqlDirect.Net Data Provider Mobile 4.0.9.1

There is an other problem with the MySqlConnection (Mobile). If the connection comes interrupted the property State remains Open and not Close. Also after the connection timeout the property State remain always Open. At the time to understand if the connection status i get the result
of Ping() method.

Thanks,
Massimo

Posted: Mon 04 Jun 2007 11:27
by Alexey
The problem with joined querries is fixed in the latest version of MySQLDirect .NET. Check it out.
As for the State property, this is a designed behaviour. You are right that it is needed to use Ping() method to find out whether connection is still alive.

Posted: Tue 05 Jun 2007 10:49
by Massimo
Can i have the link page where i can download the update version?

Thanks, Massimo

Posted: Tue 05 Jun 2007 11:44
by Alexey
If you are registered user, you should download it from the registered users area. The link was provided in the registration letter. Otherwise download it from here.

Posted: Tue 05 Jun 2007 13:24
by Massimo
How i can register my product licences and subscription basis. I have acquired MySqlDirect.Net2 Mobile and MySqlDirect.Net2 at the April 30, 2007, from www.componentsource.com.

Can i have the link where i can register my product's licences?

Thanks Massimo.

Posted: Wed 06 Jun 2007 11:21
by Devart
We sent login information to download MySQLDirect .NET Professional and Mobile editions to your email address.

Core Lab Sales
www.crlab.com

Posted: Thu 07 Jun 2007 15:44
by Massimo
Thanks for all.
I have appreciated your engagement, but unfortunately, after the update
at the 4.0.10.0 version i have the same problem with the same error.

This is the image of software version in visual studio

Image

This is the image of correct query with the Developer Tool

Image

This is the image of the error with the MySqlDataTable.active = true

Image




The query is

SELECT azienda.*, comune.*
FROM azienda
INNER JOIN comune ON comune.id = azienda.id_comune

The table structure:

CREATE TABLE `comune` (
`id` int(10) NOT NULL auto_increment,
`cap` varchar(5) NOT NULL default '',
`prov` char(2) NOT NULL default '',
`desccomune` varchar(40) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `desccomune` (`desccomune`)
) TYPE=InnoDB;

CREATE TABLE `azienda` (
`id` int(11) NOT NULL auto_increment,
`DescAzienda` varchar(50) NOT NULL default '" "',
`Indirizzo` varchar(50) default '" "',
`Id_Comune` int(11) default '0',
`Telefono` varchar(20) default '" "',
`Fax` varchar(20) default '" "',
`EMail` varchar(100) default '" "',
`Web` varchar(100) default '" "',
`CodiceFiscale` varchar(16) default '" "',
`PartitaIva` varchar(11) default '" "',
PRIMARY KEY (`id`)
) TYPE=InnoDB;



Thanks Massimo.

Posted: Mon 11 Jun 2007 07:21
by Alexey
We are investigating this problem.
Look forward to hearing from me soon.

Posted: Fri 15 Jun 2007 11:22
by Alexey
We have mistakenly fixed this in MySQLDirect .NET 4.10. For now it is fixed in 4.0 as well. Look forward to the new build.