Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B7F659FB835 for ; Tue, 15 May 2007 04:14:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95437-07 for ; Tue, 15 May 2007 04:14:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 53B189FB556 for ; Tue, 15 May 2007 04:14:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from technovell.com (219.Red-213-97-5.staticIP.rima-tde.net [213.97.5.219]) by svr4.postgresql.org (Postfix) with ESMTP id 30BEB5AF038 for ; Tue, 15 May 2007 07:14:41 +0000 (GMT) Received: from [192.168.1.200] yapt [192.168.1.200] by technovell.com with NetMail SMTP Agent $Revision: 3.22.1.16 $ on Linux via secured & encrypted transport (TLS); Tue, 15 May 2007 09:14:37 +0200 Message-ID: <46495DEC.5000504@technovell.com> Date: Tue, 15 May 2007 09:14:52 +0200 From: Terry Yapt User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Setting null to date field from Delphi. References: <463864E8.1030400@technovell.com> <004d01c78e22$3b731ae0$3900a8c0@Despacho> <463E5609.4000501@technovell.com> <00f001c79152$486bab30$07c8a8c0@Miguel> In-Reply-To: <00f001c79152$486bab30$07c8a8c0@Miguel> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/48 X-Sequence-Number: 8961 Thanks but I am working with TDataSets not a TQuery. As I said: Dataset.FieldByName('datefield').isnull is returning TRUE but when I do a post to Database then PostgreSQL complaint with error: 22008. Any another idea ? Thanks... >> >> >> Miguel Juan escribió: >>> Hi, >>> >>> have a look to the class TParam: TParam.Clear ,TParam.Bound and >>> ftDate >>> >>> Regards >>> >>> Miguel Juan >>> ----- Original Message ----- From: "Terry Yapt" >>> To: >>> Sent: Wednesday, May 02, 2007 12:16 PM >>> Subject: [ODBC] Setting null to date field from Delphi. >>> >>> >>>> I am working with Delphi 2006 and pgsql-odbc driver 8.02.02.00 to >>>> 8.02.04.00. >>>> >>>> I am trying to set a date field to null. In spite of the boolean >>>> value of 'Dataset.FieldByName('datefield').isnull' is returning >>>> true (onBeforePost event), PostgreSQL is complaining with error: >>>> 22008 and showing the date: '0001-00-00' as the wrong date value. >>>> >>>> If someone have any idea it would be very appreciated. >>>> >>>> Thanks. >>>> >>>> ---------------------------(end of >>>> broadcast)--------------------------- >>>> TIP 6: explain analyze is your friend >>>> >>> >>> >>> >> >> > > >