Re: invalid class typecast




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

.



Relevant Pages

  • Re: Javascript Error Meaning
    ... It is an exception thrown by an internal component of Firefox. ... var nativeMethod = Components.lookupMethod(this.mUntrustedObject, ... an interface or an extension, maybe you have used this interface wrong. ... There is no way of telling unless you show some source code (please, ...
    (comp.lang.javascript)
  • Re: A remobjects wtf...
    ... // The compiler takes care of cleaning up here even if an exception was raised ... There is no exception handling necessary here, because the garbage collector will do the hard work, I don't like GC though;-). ...
    (borland.public.delphi.non-technical)
  • Re: Replacing document.getElementById with $ (dollar sign)
    ... throws an Error in Firefox ... does throw an exception, but obviously no Error. ... exception was an native Error. ... var bugRiddenCrashPronePieceOfJunk = ( ...
    (comp.lang.javascript)
  • No exception here!
    ... {$APPTYPE CONSOLE} ... x:= nil; ... Shouldn't the above cause an exception? ...
    (borland.public.delphi.non-technical)