Hi
I am using code that is below and i am getting the result :com.mysql.jdbc.Blob@b87d31 if i am using out.println(rs.getBlob("room_type_image")+"<br>");
and garbage values when i am using :: out.println(rs.getString("room_type_image")+"<br>");
Code :::
<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost:3306/hotel_reservation";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
%>
<html>
<body>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "root","sachin");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT * FROM room_types_master");
while (rs.next()) {
out.println(rs.getBlob("room_type_image")+"<br>");
}
%>
</body>
</html>
Thanks ,,