Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Overflow while converting variant of type (LongWord) into type (Integer).
Tue, Feb 24 2009 1:24 AMPermanent Link

Richard Harding
Tim,

Using EDB 2.02b8 with Delphi 2007.

A customer sent this bug report.  I have sent out a very small demonstration database that
has been used by a number of potential customers.  This one customer has this overflow
error on start of program.  The other customers of all OK with an identical DB.

Any idea what could be creating this?

Richard Harding . . . .

exception number  : 1
exception class   : EEDBError
exception message : Overflow while converting variant of type (LongWord) into type (Integer).

Main ($14ec):
00b722c5 +000 edb202r2007run.bpl
7c90eaf5 +009 ntdll.dll                            KiUserExceptionDispatcher
20006ba9 +01d rtl100.bpl         System            @AfterConstruction
00af8f24 +198 edb202r2007run.bpl Edbvalue          TEDBValue.SetAsVariant
00b721d8 +110 edb202r2007run.bpl Edbcomps          TEDBDataSet.LocateRecord
00b72436 +026 edb202r2007run.bpl Edbcomps          TEDBDataSet.Locate
0083f267 +193 Mamba.exe          Main     1099 +25 TfmMain.FormCreate
20158ac9 +031 vcl100.bpl         Forms             TCustomForm.DoCreate
20158721 +011 vcl100.bpl         Forms             TCustomForm.AfterConstruction
20006ba9 +01d rtl100.bpl         System            @AfterConstruction
201627a2 +06e vcl100.bpl         Forms             TApplication.CreateForm
0084c596 +05e Mamba.exe          Mamba      54  +5 initialization
Tue, Feb 24 2009 9:40 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< A customer sent this bug report.  I have sent out a very small
demonstration database that has been used by a number of potential
customers.  This one customer has this overflow error on start of program.
The other customers of all OK with an identical DB.

Any idea what could be creating this? >>

Not really.  I just tried a Locate in the EDB Manager (Open Table..Search
for Row) on an Integer column with the value 4294967295 and I got the proper
error:

ElevateDB Error #1011 An error occurred with the value 0 (The value is out
of the range of permissible values for the Integer type)

(the 0 value in the message is a mistake and will be corrected)

Are you using Delphi 5, perhaps ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Feb 24 2009 9:15 PMPermanent Link

Richard Harding
Tim,

The problem was caused by trying to store the HardwareID which is a DWORD (or LongInt)
into an Integer field and this one person had a HardwareID which had the high order bit set.

If the high order bit is set on the HardwareID, I make it a negative number and all is well.



Richard Harding
Wed, Feb 25 2009 9:39 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< The problem was caused by trying to store the HardwareID which is a DWORD
(or LongInt) into an Integer field and this one person had a HardwareID
which had the high order bit set.

If the high order bit is set on the HardwareID, I make it a negative number
and all is well. >>

Hmmm, interesting.  I'll still check it out, though, and see if I can
replicate the overflow situation, which shouldn't happen.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image