OLE error 80040E21 reading BIGINT using AsFloat
- From: "Dan Cumpian" <ir000387@xxxxxxxxxxxxxx>
- Date: Sat, 9 Sep 2006 12:53:00 -0400
Hello,
We have a program that connects to a SQL Server database. There are
several BIGINT fields in the database. To retrieve data from one of the
fields, we use the following code:
function GetBytesAsMB: Real;
begin
Result:=DMMSSQL.QryServers.FieldByName('BytesPerLimit').AsFloat/1048576;
6; end;
Now, for 90% of our customers, this works just fine. We can't retrieve
using "AsInteger" because the number can easily be larger than the number
supported by the Integer type. However, a few installations return the
following error:
exception class : EOleException
exception message : OLE error 80040E21.
The exception is raised at line 4199 in ADODB.pas:
DataConvert(Field, @C, Buffer, True) else
First question: Is there a SQL Server setting that could be preventing
this from working?
Second question: Is there a safer way to do this?
Thanks,
Dan
.
- Follow-Ups:
- Re: OLE error 80040E21 reading BIGINT using AsFloat
- From: John Herbster
- Re: OLE error 80040E21 reading BIGINT using AsFloat
- From: Guillem
- Re: OLE error 80040E21 reading BIGINT using AsFloat
- Prev by Date: Re: From TTable to TADOTable
- Next by Date: ADOX and TurboDelphi question
- Previous by thread: Problem in D2006 from D7
- Next by thread: Re: OLE error 80040E21 reading BIGINT using AsFloat
- Index(es):
Relevant Pages
|