• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Probs with Sybase

 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am connecting to Sybase db using the JConnect JDBC driver.
But when I fire a query for getting data from a column and the column is blank,then it returns " "(a string of length 1).
If I check for this column on the REsultSet object using the wasNull(),the it still says false.
My appln needs to work on Oracle and MS SQL as well.
The check for blank value in col is,
if(value == null || value.length() == 0)
Now I have to change this to
if(value == null || value.trim().length() == 0)
which I dont want to do,as sometimes leading and trailing spaces might form meaning full data for my client.
Is there any way around this?
Do we have any other Sybase driver which avoids this?
Plzz let me know.
thanks,
Chinmay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic