"Arto Viitanen" wrote...
>> Perhaps this is more of an Access question. I'm discovering that
>> Access' "Long Integer" cannot store a java Long. So I'm resorting to
>> string the numbers as strings. I'm I doing the right thing (other than
>> using Access :) ) or missing someting?
> Why not use java.math.BigDecimal? ResultSet supports it (getBigDecimal
> etc.) and you can (kind of) calculate with it. If scale is 0, it behaves
> like integer.
You've misunderstood the question of the OP.
He doesn't need an alternative to long on the Java side, where obviously a
long is sufficient.
To change from long to BigDecimal wouldn't solve his problem.
As Access/Jet doesn't even support a Java long in numerical form, to change
to BigDecimal would be even worse...
I believe the OP have to live with his current solution, as Access/Jet most
likely will keep the old VB compatible data types only.
Depending on what the OP actually uses the fields for, another solution
*could* be to bitmask the long value (64 bits) into two int's (32 bits) and
store them separately in two fields in the DB, and correspondingly merge
them together into one field when retrieving them from the DB...
I don't know if he would gain anything with it comparing to the "string"
version, but it's nevertheless an alternative...
...or to change to another DB...
// Bjorn A
aaronfude@gmail.com - 29 Jan 2006 19:29 GMT
> "Arto Viitanen" wrote...
>
[quoted text clipped - 31 lines]
>
> // Bjorn A
What a complete answer! Thank you very much!
Can I assume that more serious databases, such as MySQL support the
long format?
Thanks!
IchBin - 29 Jan 2006 20:43 GMT
>> "Arto Viitanen" wrote...
>>>> Perhaps this is more of an Access question. I'm discovering that
[quoted text clipped - 35 lines]
>
> Thanks!
Would guess most all do.. In this case you are just dealing with Microsoft.

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Bjorn Abelli - 30 Jan 2006 10:10 GMT
> Bjorn Abelli wrote:
>> ...or to change to another DB...
>>
[quoted text clipped - 4 lines]
> Can I assume that more serious databases, such as MySQL support the
> long format?
MySQL has the data type BIGINT, which corresponds very well to a Java long
(64 bits integer).
// Bjorn A