List:MySQL and .NET« Previous MessageNext Message »
From:Marcin Domański Date:November 22 2004 1:27pm
Subject:DateTime updates in 1.0.2
View as plain text  
I don't know if it is my mistake or not but when I load some records to
DataSet modify them and try to update I recive error:
System.ArgumentOutOfRangeException. and message about year month day
representing datetime which cannot be presented (literal translation).
I tried not to modivy any datetime values but it did not helped.
Looks like it cannot save values back.
*******************
CREATE TABLE `g_oferta` (
  `ID_klienci_firma` bigint(18) default '0',
  `ID_klienci` bigint(18) default '0',
  `ID_miejscowosc` int(11) default '0',
  `ID_dzielnica` int(11) default '0',
  `ID_osiedle` int(11) default '0',
  `ID_pracownik` bigint(18) default '0',
  `ID_uprawnienie` int(11) default '0',
  `ID_oferty` int(11) NOT NULL auto_increment,
  `ID_globalny` bigint(18) NOT NULL default '0',
  `ID_adresu` int(11) default '0',
  `ID_typyWymianyOfert` int(3) NOT NULL default '0',
  `data_rejestracji` datetime default '0000-00-00 00:00:00',
  `data_modyfikacji` datetime default '0000-00-00 00:00:00',
  `data_wczytania` timestamp(14) NOT NULL,
  `dostepnosc_od` date default '0000-00-00',
  `rezerwacja_do` date default '0000-00-00',
  `numer_oferty` int(11) default '0',
  `typ_oferty` char(1) default 's',
  `typ_nieruchomosci` varchar(10) default '',
  `cena` decimal(10,2) unsigned default '00.00',
  `cena_za_metr` decimal(8,2) default '0.00',
  `prowizja_sp` decimal(7,2) unsigned default '0.00',
  `prowizja_sp_czy_procent` char(3) default '0',
  `uwagi` text,
  `typWymiany` char(2) default '',
  `do_kiedy_wylacznosc` datetime default '0000-00-00 00:00:00',
  `status` char(1) default NULL,
  PRIMARY KEY  (`ID_oferty`),
  UNIQUE KEY `IDX_g_oferta_11` (`ID_globalny`),
  KEY `id_pracownik` (`ID_pracownik`),
  KEY `id_dzielnica` (`ID_dzielnica`),
  KEY `id_adresu` (`ID_adresu`),
  KEY `numer_oferty` (`numer_oferty`),
  KEY `id_oferty` (`ID_oferty`),
  KEY `id_miejscowowsci` (`ID_miejscowosc`),
  KEY `ID_typyWymianyOfert` (`ID_typyWymianyOfert`),
  KEY `id_klienci_firma` (`ID_klienci_firma`),
  KEY `id_osiedle` (`ID_osiedle`)
) TYPE=MyISAM CHECKSUM=1 COMMENT='wspolna tabela ofert';
#
**************
Code is somewhat large so I will post it later if needed.
Using mysqlcommand->adapter with command builder->dataset

converting dates to datetime don't solve the problem.
I can't understand why not modified datetimes causes problem during
updating  bun not loading. This is strange because similar code but
working on other table is doing fine. The only difference is the date
fields and their values which are often like 2031-..-..

Propably it's my mistake but maybe someone experienced can help me.
Can You tell me at least when this problem use to occur?

Martin

Thread
DateTime updates in 1.0.2Marcin Domański22 Nov