Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORACLE 8i & DELPHI 5

Re: ORACLE 8i & DELPHI 5

From: cne valentin <delprog_at_bdi-emat.terre.defense.gouv.fr>
Date: Fri, 8 Dec 2000 13:41:11 -0000
Message-ID: <90qkp8$s41$1@s1.read.news.oleane.net>

Hello Carl,

This is a exemple of my code :

if (not (DataSet.fieldbyname(MY_MONTH').isnull ) and

   not (DataSet.fieldbyname('MY_YEAR').isnull)) then

     DataSet.FieldByName('END_DATE').asstring := LibMonth(DataSet.fieldbyname('MY_MONTH').AsInteger)+' '+

    (DataSet.fieldbyname('MY_YEAR').AsInteger);

The function 'LibMonth' returns the name of the month when I give the number of the month.

With an skill in Oracle, we have tried differents solutions.

1 - when we write that :
  DataSet.FieldByName('END_DATE').asstring := 'aaaaaaaaaaa';  .... no probleme

2 - when we write that :
  DataSet.FieldByName('END_DATE').asstring := DataSet.fieldbyname('MY_YEAR').AsInteger;  ...... Error : 'Operation en virgule flottante incorrecte'

that's all !

I am afraid that in Delphi a null value is not understood like that. Sometimes it gives me 0 whereas in Oracle the value is null !!!

Maybe my code is wrong ....
Thank for your help because I must deliver my application Monday 18 th.

Thanks
Fred.

<c_joh_at_my-deja.com> a écrit dans le message : 90q9k7$469$1_at_nnrp1.deja.com...
> Can you give an example of your code?
>
> I have never seen anything like that. Would be intresting to find out
> why.
>
> -Carl
>
>
> In article <90q441$k1n$1_at_s1.read.news.oleane.net>,
> "cne valentin" <delprog_at_bdi-emat.terre.defense.gouv.fr> wrote:
> > Hello
> >
> > I am working with Delphi 5 and Oracle 8.1.6. In my database i have
 got a
> > filed which is Null.
> > When i am testing this value in my programme, Delphi returns either
 null or
> > 0 or something completly made as 6542454645645.213 E-312
> >
> > That problem is random.
> > What can I do
> > Thanks. Fred
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Dec 08 2000 - 07:41:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US