It's not a secret anymore!
The moose likes Beginning Java and the fly likes how do i convert 0x64766972 to dvir Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how do i convert 0x64766972 to dvir" Watch "how do i convert 0x64766972 to dvir" New topic
Author

how do i convert 0x64766972 to dvir

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 dir how do i convert?


Senior software engineer
grisha37
Greenhorn

Joined: Jul 29, 2001
Posts: 5
How do you read things? What is the query? Perhaps
you need to use the number of the field (like getString(3)
instead of the name. It depends...
Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
import java.sql.*;
import java.io.*;
public class ConnectToOracle
{
public static void main(String args[])
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection ("jdbc racle:thin:@serverhost:1521:sid","username","password");
String Query="select province_name from province_info";
PreparedStatement st=conn.prepareStatement(Query);
ResultSet Result=st.executeQuery();
while (Result.next())
{
System.out.println(Result.getString("province_name"));
}
Result.close();
st.close();
conn.close();
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
}
}
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: how do i convert 0x64766972 to dvir
 
It's not a secret anymore!