Hi, i was trying to use the com.fdspi but i can't generate any right result. Using Tomcat 4.0 and MS Access Database but an internal error message is the result.
My table name is "Customer" table, and this is my coding, a jsp file saved as "test.jsp".
<%@page contentType="text/html"%>
<%@ page language="java" buffer="8kb" autoFlush="true" isThreadSafe="true" info="Info
string" isErrorPage="false" %>
<%@ page import="java.util.*, com.fdsapi.*, com.jamonapi.*" %>
<%@ page import="java.sql.*" %>
<%
DataAccess da = new DataAccessClient("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:Database",true);
FormattedDataSet fds=FormattedDataSet.createInstance();
fds.setDataAccessFactory(da);
String quere = "SELECT * FROM Customer";
Monitor mon=MonitorFactory.start("fdsapi.page.test");
String html = fds.getFormattedDataSet(quere, "htmlTable");
%>
<%= html%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/formatteddataset.css">
<title></title>
</head>
<body>
</body>
</html>
-
How to use FormattedDataSet... (2 messages)
- Posted by: zalaqa toosh
- Posted on: November 27 2003 05:36 EST
Threaded Messages (2)
- How to use FormattedDataSet... by stephen smithstone on November 27 2003 10:34 EST
- How to use FormattedDataSet... by steve souza on November 28 2003 14:16 EST
-
How to use FormattedDataSet...[ Go to top ]
- Posted by: stephen smithstone
- Posted on: November 27 2003 10:34 EST
- in response to zalaqa toosh
what is the error ?? -
How to use FormattedDataSet...[ Go to top ]
- Posted by: steve souza
- Posted on: November 28 2003 14:16 EST
- in response to zalaqa toosh
I've seen problems with the access jdbc driver. The following fixed the problem. Let me know if this doesn't work.
Steve - http://www.fdsapi.com
[code]
...
FormattedDataSet fds=FormattedDataSet.createInstance();
fds.setDataAccessFactory(da);
String quere = "SELECT * FROM Customer";
Monitor mon=MonitorFactory.start("fdsapi.page.test");
ResultSetConverter rsc=fds.getResultSetConverter(quere);
String html = fds.getFormattedDataSet(rsc, "htmlTable");
[/code]