jdbc connection to MS access database



Im trying to connect my database. im using ms access when i try to
execute my program it gives me this error
i create my database by going to the odbc in the administrative tools.
and when i try to execute my code it gives me this error:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at Transit.main(Transit.java:16)

and this is the code im using.

try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(Exception e){
e.printStackTrace(System.err);
}
Connection con;
Statement stmt;

//connecting to the database.
try{
con=DriverManager.getConnection("jbdc:odbc:Hw3");//this is where
its giving me errors
stmt=con.createStatement();

con.close();
stmt.close();
}
catch(Exception sqle){
sqle.printStackTrace(System.err);
}
any suggestions do i have to download any updates or something im
using java 1.5 sdk.

.



Relevant Pages

  • Re: Cross-database execution permissions with certificates and sch
    ... activated user cannot access objects in other schemas in this database. ... injection is defended against, however, the threat exists anywhere EXECUTE ... CREATE USER dispatcher ... the certificate is a trusted authenticator because you granted AUTHENTICATE ...
    (microsoft.public.sqlserver.security)
  • Re: how to move location of default database???? plz!
    ... fine, cool about the database, it probably amounts to how much tagging one ... updates - i woulda rolled them all back. ... No recent version of Windows does ... well when you have less than about 50MB to 100MB of free space. ...
    (microsoft.public.windowsmedia.player)
  • Re: connecting to a database
    ... so I'm attempting to code it up in java. ... I have no idea how to set up a connection. ... connection to an Access Database that they would be willing to post. ... sql. ...
    (comp.lang.java.programmer)
  • Stuff the purple heart programmers cook up
    ... C To act like a framework for the JDBC driver developers. ... D To hide the specifics of accessing particular kinds of database ... Topic: Java 2: Survey Author: Chris Mc Devitt ... The JDBC ResultSet is actually an interface java.sql.ResultSet. ...
    (comp.lang.java.programmer)
  • Re: Update Sql Server 2000 database from the HP3000
    ... collects those updates via ODBC every 10 or so seconds. ... essentially update the SQL database at the same time as the main ... Authorised and regulated by the Financial Services Authority. ...
    (comp.sys.hp.mpe)