🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi.bazy-danych
Article #70331

DBEdit i podwojny komunikat bledu

#70331
From: tomek
Date: Thu, 05 Jul 2007 08:57
23 lines
1634 bytes
Witam!
Mam baze podpieta przez BDE. Na formatce DBEdita polaczonego z polem 
timestamp gdzie wpisuje date. Mam zalozona maske RRRR-MM-DD ale jesli 
ktos wpisze miesiac > 12 lub dzien > 31 to i tak wyswietla sie blad 
"...is not a valid date".
Odsluge bledu zrobilem w SetText pola daty tak jak znalazlem w archiwum:

procedure TEditData.DateSetText(Sender: TField; const Text: String);
const
   SInvalidDate = '''%s'' nie jest poprawna data.';
begin
   try
     Sender.AsDateTime := StrToDate(Text);
   except
     on EConvertError do ShowMessage(Format(SInvalidDate, [Text]));
     Abort; {Jesli to ma byc tylko tlumaczenie, a nie obsluga bledu}
   end;
end;

Ale teraz mam 2 komunikaty - najpierw pierwszy angielski a pozniej drugi 
polski. Trzeba jeszcze gdzies wylaczyc wyswietlanie komunikatu angielskiego?

Tomek
Technical Details
Message-ID: <f6ibmh$ke9$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!opal.futuro.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!opal.futuro.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: tomek <123_tomek_NO_SPAM@wp.pl>
Newsgroups: pl.comp.lang.delphi.bazy-danych
Subject: DBEdit i podwojny komunikat bledu
Date: Thu, 05 Jul 2007 10:57:39 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 23
Message-ID: <f6ibmh$ke9$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: omega.pec.bytom.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1183625745 20937 213.76.138.10 (5 Jul 2007 08:55:45 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Thu, 5 Jul 2007 08:55:45 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.12 (Windows/20070509)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit