I tried and succeeded in pulling out the info from the ms access database tables. But I am not able to pull out the images. They are in the text form.
Is there any way to overcome this
this is my code:
<html>
<body>
<%@ page import="java.sql.*,java.awt.Image" %>
<%
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=null;
conn = DriverManager.getConnection("jdbc:odbc:simpledb", "", "");
out.println ("Database Connected.");
Statement s = conn.createStatement();
ResultSet r =
s.executeQuery(
"SELECT * " +
"FROM bookprice");
while(r.next()) {
out.println(
r.getString("title") + " " +
r.getString("price")+r.getString("Image"));
}
%>
</body>
</html>
r.getString("Image") should I replace getString with getImage etc???
bookprice is the table which contains fields like
title price Image