Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 202349FB660 for ; Tue, 15 May 2007 04:11:13 -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 94348-08 for ; Tue, 15 May 2007 04:11:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id DA3EB9FB556 for ; Tue, 15 May 2007 04:11:07 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 634AA3090A; Tue, 15 May 2007 09:11:06 +0200 (MET DST) From: "Terry Yapt" X-Newsgroups: pgsql.interfaces.odbc Subject: Re: Setting null to date field from Delphi. Date: Tue, 15 May 2007 07:11:02 +0000 (UTC) Organization: Hub.Org Networking Services Lines: 54 Message-ID: References: <463864E8.1030400@technovell.com> <004d01c78e22$3b731ae0$3900a8c0@Despacho> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: usenet@news.hub.org User-Agent: XanaNews/1.18.1.6 To: pgsql-odbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200705/55 X-Sequence-Number: 8968 Thanks but I am working with TDataSets. 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" wrote: > 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 > > > > > > ---------------------------(end of > broadcast)--------------------------- TIP 6: explain analyze is your > friend --