Re: invalid class typecast
- From: "Barak zabari" <lotemlotad@xxxxxxxxx>
- Date: Thu, 28 Apr 2005 11:06:09 +0200
My guess is that by useing TNumericField you will get the precision of a
numeric field and that's not what you wanted.
Try to put an 18 digit number in the database and run this if you get the
currect value back to the database then you should be good.
"yc" <yc@xxxxx> wrote in message news:426cff80$1@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> Hi again,
> I just figured out something I wonder if it is ok ?
> It didn't raise any exception.
>
> var
> nf : TNumericField;
> i64 : Int64;
> begin
> with qry1 do
> begin
> Close;
> nf := qry2.FieldByName('REFNO') as TNumericField;
> i64 := nf.Value;
> Parameters.ParamByName('REFNO').Value := i64;
> Open;
> end;
> end;
>
> Thanks again
> yc
>
> "yc" <yc@xxxxx> wrote:
> >
> >Hi,
> >
> >I'am trying to use TLargeIntField, it is giving me a headache.
> >
> >I've two Access tables tbl1 and tbl2 (qry1 and qry2).
> >Using TLargeIntField field type as follows, I get an invalid class
typecast exception.
> >
> >var
> > li : TLargeIntField;
> >begin
> > with qry1 do
> > begin
> > Close;
> > li := qry2.FieldByName('REFNO') as TLargeIntField; //EXCEPTIO is here
> > Parameters.ParamByName('REFNO').Value := li.Value;
> > Open;
> > end;
> >end;
> >
> >Any idea ?
> >
> >Thanks in advance
> >yc
>
.
- References:
- invalid class typecast
- From: yc
- Re: invalid class typecast
- From: yc
- invalid class typecast
- Prev by Date: Re: linked tables in Access database
- Next by Date: Re: MySQL, ADO and ODBC
- Previous by thread: Re: invalid class typecast
- Next by thread: Refresh adoQuery
- Index(es):