Re: setNumericObject for Types.BIT in PreparedStatement.java

Mark Matthews <[email protected]> Tue, 12 Feb 2008 10:40:05 -0600
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Giedt, Matt wrote:
| Hi Mark,
|
| I'm curious to your thoughts on adding logic to detirmine if the
| parameterObj is a String, also test for "1" instead of only "true".
|
| boolean parameterAsBoolean = "true".equalsIgnoreCase((String)
| parameterObj) || "1".equalsIgnoreCase((String) parameterObj);
|
| With thanks,
| -Matt
|

Matt,

It's due to a test in the JDBC compliance testsuite, where they pass in
"1" as a string via setObject(int, "1", Types.BOOLEAN), and expect it to
evaluate to "true" when read back out of the database.

	-Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHscvltvXNTca6JD8RAhv5AJsE65FHi+jsnKMbB8REcpIl5NIbGwCgusE/
QH2vyeJdd0ch2/MeyuL/OI4=
=4Tdr
-----END PGP SIGNATURE-----

-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]