Error with MySqlDataTable and a SELECT with INNER JOIN
Error with MySqlDataTable and a SELECT with INNER JOIN
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
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
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
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
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.
Can i have the link where i can register my product's licences?
Thanks Massimo.
We sent login information to download MySQLDirect .NET Professional and Mobile editions to your email address.
Core Lab Sales
www.crlab.com
Core Lab Sales
www.crlab.com
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
This is the image of correct query with the Developer Tool
This is the image of the error with the MySqlDataTable.active = true
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.
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
This is the image of correct query with the Developer Tool
This is the image of the error with the MySqlDataTable.active = true
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.