Re: OLE error 80040E21 reading BIGINT using AsFloat
- From: "Guillem" <guillemvicens-nospam@xxxxxxxxxxxxxxxxxx>
- Date: 12 Sep 2006 01:23:19 -0700
John Herbster wrote:
Dan, I hope that I fixed the above correctly.
?
I am not familiar with ADO, but I assume that BIGINT is 64-bits
signed integer, and that ADO does not allow reading as such.
I have not used MS SQL Server so I can't really tell what BIGINT is but
I would like to think that ADO *can* handle it, since it is the native
component set for that RDBMS...
As far as a work-a-round, can you bypass the AsInteger
and AsFloat and read the 64-bits out of the record buffer
as bytes? If so, then you could convert the 8-bytes directly
into 8-byte buffer and from there directly into an Int64
integer type.
this remembered me something and after digging a bit I think Dan could
try to use following:
function GetBytesAsMB: Real;
var
number : Int64;
begin
Number :=
TLargeIntField(adodataset1.Fields.FieldByName('field')).AsLargeInt;
Result := Number / 1048576;
end;
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
.
- References:
- OLE error 80040E21 reading BIGINT using AsFloat
- From: Dan Cumpian
- Re: OLE error 80040E21 reading BIGINT using AsFloat
- From: John Herbster
- OLE error 80040E21 reading BIGINT using AsFloat
- Prev by Date: Re: OLE error 80040E21 reading BIGINT using AsFloat
- Next by Date: Re: OLE error 80040E21 reading BIGINT using AsFloat
- Previous by thread: Re: OLE error 80040E21 reading BIGINT using AsFloat
- Next by thread: ADOX and TurboDelphi question
- Index(es):
Relevant Pages
|