The Exception I am getting when I am running the program is
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not fou nd and no default driver specified at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source) at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source) at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at jdbcDemo.main(jdbcDemo.java:13) [ August 09, 2006: Message edited by: sai donthneni ]
check whether your DataSourceName is pointing to your database correctly or not.If not configure that correctly.
and use finally block to close your connection and statement.
Joined: Mar 26, 2006
My datasource has been mentioned properly. Do I have to mention that it is on the localhost? My database name is Part6. Do I have to download the drivers seperately or do they come with the database server itself?