Re: invalid class typecast




"Viatcheslav V. Vassiliev" <support@xxxxxxxxxxxxxxx> wrote:
>> li := qry2.FieldByName('REFNO') as TLargeIntField; //EXCEPTIO is here
>
>var
> str: string;
>
>str := qry.FieldByname('REFNO').ClassName;
>
>You will see what is this field.
ok, lets say the field name is TIntegerField, is there any way to use int64 instead of integer ?

>
>//------------------------------------------
>Regards,
>Vassiliev V. V.
>http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
>ADO.Net
>http://www.oledbdirect.com - The fastest way to access MS SQL Server,
>MS Jet (Access) and Interbase (through OLEDB)
>
>"yc" <yc@xxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
>news:426cc59b$1@xxxxxxxxxxxxxxxxxxxxxxxxx
>>
>> 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: Calculate the string statement
    ... verkn:(vkn:char; ... funkt:(fkt:string; ... var fkt,dfkt: p; ... var fehler: boolean; ...
    (comp.lang.pascal.borland)
  • Two new tests for MM B&V
    ... var RunningThreads: Integer; ... class function TStringThreadTest.GetBenchmarkDescription: string; ... function CheckPattern(const Dest: Pointer; const Size: Integer; const ...
    (borland.public.delphi.language.basm)
  • server-side JavaScript: Prototypes of built-in classes, objects and functins
    ... Session object (disk-based session variables for data persistence ... File class (manipulation of files on server, ie. open, close, read, ... //Methods Cgi.queryCgi.postCgi.anyby default return an empty string if requested var not found ...
    (comp.lang.javascript)
  • Re: [PHP] Image Generation
    ... the text, font, colour, maximum frame size (ie the width and height it ... var $xoffset, $yoffset, $margin; ... a string or array of strings. ... a float or an array of floats - which size to display the related text at. ...
    (php.general)
  • Re: Ajax -> javascript edit box display problems - please help
    ... Public Function GetUsernameList(ByVal testParam As String) As String ... successfully with the AutoComplete.js script. ... getLength: function{ ... var v = this.getValue); ...
    (comp.lang.javascript)