Question about handling of string of length 0 in PreparedStatement.setString()

2005-08-23 Thread Bryan Pendleton
Hi, I'm wondering if someone has run into this and can help me understand what's happening. I'm porting some JDBC code from Another Database to Derby; I'm using Derby 10.1.1.0 on RedHat Linux. My program contains a snippet of code something like: PreparedStatement stmt =

Re: Question about handling of string of length 0 in PreparedStatement.setString()

2005-08-23 Thread Matt Sanford
Hello, Not sure I can assist with more than my 2 cents. Since a blank string is different than the absence of value (null), I would argue that Derby is doing the correct thing, while the other DBMS is guessing at the user's intentions. The root cause of this specific message is that

Re: Question about handling of string of length 0 in PreparedStatement.setString()

2005-08-23 Thread Rick Hillegas
Hi Bryan, Nice to see you on the list. It may be that the database which would remain nameless is Oracle. Oracle treats 0-length strings as null. Note that Oracle documentation confesses that this is a bad idea and darkly hints that future versions of Oracle may conform to the standard