Just use the JDBC:ODBC bridge. Here is an example of a Java application
that connects to a DSN named "Movies_DSN" which points to an Access databse:
import java.sql.*;
public class AccessTest
{
public static void main(String[] args)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn =
DriverManager.getConnection("jdbc:odbc:Movies_DSN");
Statement s = conn.createStatement();
ResultSet rs = s.executeQuery("SELECT Title FROM
Movies");
while (rs.next())
{
System.out.println(rs.getString(1));
}
}
catch(ClassNotFoundException cnfe)
{
cnfe.printStackTrace();
}
catch(SQLException sqle)
{
sqle.printStackTrace();
}
}
}
> -----Original Message-----
> From: Kallur, Padmaja (GEL, MSX) [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, September 23, 1999 12:15 PM
> To: [EMAIL PROTECTED]
> Subject: MS ACCESS
>
> Hi all,
>
> Does anyone know how to connect to MS access using JSP. I have a set of
> pages which are in ASP style, now my task is to port it to JSP.
>
> Please let me know,if any one of you did this kind of stuff.
>
> Any help will be highly appreicated
>
> Thanks in advance
> Padma
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html