I have to store a Int64 Delphi value in a bigint SQL Server field.
In others datatypes I'm using the As<DataType> methods.
Integer (32 bits) = qry.ParamByName('field1').AsInteger := integerValue,
String = qry.ParamByName('field2').AsString := stringValue,
and so...
The question is, which method do I have to use to cast the Int64 value to
bigint??
qry.ParamByName('field3').As???????? := int64Value,
Thans in advance,
FF
AsCurrency will do the job, or use Value that will return an Variant
--
Bojidar Alexanrov
Kodar Ltd.
http://www.Kodar.net
Fernando,
Have you looked at TLargeintField and AsLargeInt?
Regards, JohnH
TLargeintField(qry.FieldByName('COD_PEDIDO')).AsLargeInt
Does exist another way to do this?
Thanks again.
FF.
"John Herbster (TeamB)" <herb-sci1_at_sbcglobal.net> wrote in message
news:3e4a4d55$1...@newsgroups.borland.com...
Fernando,
Yes. To check that it is really a safe type cast, I would do
(qry.FieldByName('COD_PEDIDO') as TLargeintField).AsLargeInt
This will check the type before casting it.
Rgds, JohnH