Board index » delphi » .AsInteger problem

.AsInteger problem

Hi there!!!!
I'm trying to insert this integer number in a table's field:

10000000000

the thing is that when I do this:

qry := TQuery.Create(nil);
qry.sql.add('insert into test (id,name) values (:id,:name)');
qry.parambyname('id').asinteger := 10000000000;
qry.parambyname('name').asstring := 'peter';
qry.execsql();
FreeandNil(qry);

The insertion is successful, but when I take a look at the table, it has a
negative number instead of the one I wanted to insert. This happens because
the number is bigger than 32 bits. The question is: is there a way to solve
this without having to change the .AsInteger to .AsFloat???

Thanks

--
A R I E L
[ T E A M   N E T L A N ]

 

Re:.AsInteger problem


No. The BDE does not support 64 bit integers.

--
Bill
(TeamB cannot answer questions received via email)

Re:.AsInteger problem


You can always write routines to split your number into two integer fields.
This is not ideal, but it is a solution.

--
Joseph Misko

"Bill Todd (TeamB)" <f...@foo.com> wrote in message
news:3c238720$1_2@dnews...

Quote
> No. The BDE does not support 64 bit integers.

> --
> Bill
> (TeamB cannot answer questions received via email)

Other Threads