Re: invalid class typecast



"yc" <yc@xxxxx> wrote in message news:426cc59b$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> 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.
> li := qry2.FieldByName('REFNO') as TLargeIntField; //EXCEPTIO is here

Why do you cast it as TLargeInt? This means the INT64 type while MS Access
doesn't support INT64 fields. Suppose you need just TIntegerField.


.



Relevant Pages

  • Re: Why "Specified cast is not valid" error?
    ... I was surprised to see it was of Int64 type. ... > thought it would just be a generic object type and then I could cast it to ... > string or integer. ... read a good book on the basics of .NET, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Why "Specified cast is not valid" error?
    ... I was surprised to see it was of Int64 type. ... thought it would just be a generic object type and then I could cast it to ... I'm still a little confused why I can't cast an Int64 to String but I will ...
    (microsoft.public.dotnet.languages.csharp)