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: Clive Walden <clivew_at_cts.com>
Date: Sat, 09 Dec 2000 10:24:15 -0800
Message-ID: <dst43t84l2mcsf3pp58hsag9gic2v47vpr@4ax.com>

>when we write that :
> DataSet.FieldByName('END_DATE').asstring :=
>DataSet.fieldbyname('MY_YEAR').AsInteger;

Object Pascal is a strongly typed language. You can not assign an integer to a string.

ASSUMING the assignment you are trying to make is logically what you want use
 DataSet.FieldByName('END_DATE').asString := DataSet.fieldbyname('MY_YEAR').AsString;

If a field could be null then test for isNull.

I do not know if you are using the BDE or some third party connection like "Direct Oracle Access" (Which I strongly recommend). I do not remember which links or where; but some allow you to specify how Nulls will be treated. i.e. returned as Null or default to Zero or empty string as requested.

Personally, I would stick to testing up front with Field.isNull.

Clive Received on Sat Dec 09 2000 - 12:24:15 CST

Original text of this message

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