aspose file tools*
The moose likes JDBC and the fly likes I'm posted 1000000000 times tell me idea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "I Watch "I New topic
Author

I'm posted 1000000000 times tell me idea

Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
I read data from Oracle Database
String st2=Result.getString("user_name");
out.println(st2);
but result is
0x64766972 not "dvir" how do i convert 0x64766972->dvir?

Senior software engineer
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I'm not going to try guess why you haven't received a reply yet, but (stuff) happens.
Can you post a bit more code defining the problem?
Basically from the where you define the query to the getString line or there abouts would help us (and therefore you ) alot.
Dave.
just to get you started, here's how mine usually looks (note that I use indecies rather than attribute names by preference, but that's just me):
Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
Thanks. I have one question.
if i wrote this code
Statement st=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet Result=st.executeQuery(Query);
Result.first();
System.out.println(Result.getString(1));
display 0x61
if i use PreparedStatement
PreparedStatement st=conn.prepareStatement(Query);
ResultSet Result=st.executeQuery(Query);
Result.first();
System.out.println(Result.getString(1));
display a
Why?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Hmm, I don't use rs.first() or statements so I really couldn't answer. I found a way that works, I like it, never needed anything more complicated.
Anyone?
Dave.
ps: has your initial problem been fixed for the moment?
Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
yeah first problem is fixed thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I'm posted 1000000000 times tell me idea