16 messages in com.mysql.lists.javaRE: setting nulls in prepared statement| From | Sent On | Attachments |
|---|---|---|
| Twibell, Cory L | 08 Jul 2003 10:26 | |
| Twibell, Cory L | 09 Jul 2003 07:58 | |
| Pierre Awaragi | 09 Jul 2003 08:14 | |
| Twibell, Cory L | 09 Jul 2003 08:18 | |
| col...@dreamwerx.net | 09 Jul 2003 08:25 | |
| col...@dreamwerx.net | 09 Jul 2003 08:27 | |
| Pierre Awaragi | 09 Jul 2003 08:35 | |
| Jeff Mathis | 09 Jul 2003 08:41 | |
| Twibell, Cory L | 09 Jul 2003 08:42 | |
| Twibell, Cory L | 09 Jul 2003 08:46 | |
| Dane Foster | 09 Jul 2003 08:49 | |
| Marc Slemko | 09 Jul 2003 09:14 | |
| Keith Hatton | 09 Jul 2003 09:17 | |
| Paul DuBois | 09 Jul 2003 09:20 | |
| Twibell, Cory L | 09 Jul 2003 09:25 | |
| Jeff Mathis | 09 Jul 2003 09:34 |
| Subject: | RE: setting nulls in prepared statement![]() |
|---|---|
| From: | Twibell, Cory L (cory...@lmco.com) |
| Date: | 07/09/2003 08:18:14 AM |
| List: | com.mysql.lists.java |
Yes, I have tried those, it didn't work. What's the BEST setNull method to use for parameters that you have no knowledge of their data type?
-----Original Message----- From: Pierre Awaragi [mailto:pie...@awaragi.com] Sent: Wednesday, July 09, 2003 9:15 AM To: Twibell, Cory L Cc: ja...@lists.mysql.com Subject: RE: setting nulls in prepared statement
Have you tried ps.setNull(index, Types.INTEGER) or ps.setNull(index, Types.VARCHAR)
Pierre
-----Original Message----- From: Twibell, Cory L [mailto:cory...@lmco.com] Sent: July 9, 2003 10:59 AM To: 'ja...@lists.mysql.com' Subject: RE: setting nulls in prepared statement
Anyone??????
-----Original Message----- From: Twibell, Cory L [mailto:cory...@lmco.com] Sent: Tuesday, July 08, 2003 11:27 AM To: 'ja...@lists.mysql.com' Subject: setting nulls in prepared statement
All,
Using MySQL4.1.0-alpha, Connect/J3.1 nightly 20030613
Have a table with a varchar and integer as NULL. Using a prepared statement, I can't seem to get "null" into the table. It's currently putting 0 for my integer. I've tried setNull( index, Types.NULL ), setObject( index, null ), setString( index, "null" )....and any combination I can think of.
My prepared statement is built dynamically, with the parameters coming in as a Vector of OBJECTs, so I wont know the data type of the parameter.
Anyone have any suggestions?
Cory Twibell Lockheed Martin Space Systems Company Electronic Combat Development Systems cory...@lmco.com (303) 971-3184
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java?unsub=cory...@lmco.com
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java?unsub=pier...@email.com




