• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I'm posted 1000000000 times tell me idea

 
Dorj Galaa
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah first problem is fixed thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic