Connector/J:Object cast with uniqueId stored procedure

Connector/J:Object cast with uniqueId stored procedure

am 13.06.2003 22:09:20 von Shawn Vincent

Connector/J

When I use the uniqueId method to get the last id entered on an
autoincrement, I see that I get an object back of type Long. However,
my table column is of type INT(11). The ResultSet getObject method
returns an object of type Integer. This seems inconsistent. Is this a
bug?

Thanks,
Shawn Vincent


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Connector/J:Object cast with uniqueId stored procedure

am 14.06.2003 13:25:51 von Sinisa Milivojevic

Shawn Vincent writes:
> Connector/J
>
> When I use the uniqueId method to get the last id entered on an
> autoincrement, I see that I get an object back of type Long. However,
> my table column is of type INT(11). The ResultSet getObject method
> returns an object of type Integer. This seems inconsistent. Is this a
> bug?
>
> Thanks,
> Shawn Vincent

It seems like a slight inconsistency, but on 32-bit systems should not
make problems.

--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Connector/J:Object cast with uniqueId stored procedure

am 16.06.2003 04:37:57 von Mark Matthews

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shawn Vincent wrote:

> Connector/J
>
> When I use the uniqueId method to get the last id entered on an
> autoincrement, I see that I get an object back of type Long. However,
> my table column is of type INT(11). The ResultSet getObject method
> returns an object of type Integer. This seems inconsistent. Is this a
> bug?
>
> Thanks,
> Shawn Vincent
>
>

Hi!

What 'uniqueId' method are you referring to? If you're talking about
Statement.getLastInsertId(), then it is a 'long', because it is designed
to hold the largest possible AUTO_INCREMENT type. If you're not talking
about Statement.getLastInsertId(), then please tell us _exactly_ (class
and method) what method you are using so we can start this discussion
from the same page :)

Thanks!

-Mark

- --
For technical support contracts, visit https://order.mysql.com/?ref=mmma

__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+7S2FtvXNTca6JD8RAgWTAJ4zBlkRXVCHSjj0zGS878HJk8z6UACd Gcnc
4zxq8C/8RT+7F1gNJiH1ZVM=
=clAa
-----END PGP SIGNATURE-----


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org