This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Strange problem help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Strange problem help" Watch "Strange problem help" New topic
Author

Strange problem help

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
Hi all.
I want to retrieve a column from DB. I have done as usual, i don't get the output. Look at the code. I get the out put if i give the value directly in the query i.e('adeeb'). If i try to set the String using preparedStatement. There is no output



The code when i used to set the string is here:



Somebody please help me out i can't understand whats happening.


Thanks and regards
alexander
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

It's a long shot, but it could be character encoding. In general, though, these two should return the same results I'd do some more general debugging. Grab a debug driver that outputs SQL queries and/or turn on query monitoring so that you can see what's being executed on the server.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange problem help
 
Similar Threads
problem with the resultset
Cannot display rows in JTable
REG: Applet Database Connectivity
How to save the changes in db through JTable
set rows color in JTable