I'm not getting this at all... I think my problem is that I'm doing the same exact thing in ASP.NET and it apparently is totally different in JAVA??
What I need to do:
I've downloaded a file: Employee.mdb, I need to access the file and print out the information. In ASP its really easy, put the file in my App_Data folder, connect to it, execute an SQL command and print it out.... for the life of me I can't figure out wtf to do in Java. The instructor gave us an example... I run it and I get an error stating there is no connection. Being the superb teacher that he is his only response to my questions is "we covered this in class" can someone help?? Here's what I have to make work:
Error making connection:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc .java:6957)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java :7114)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.j ava:3073)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOd bcConnection.java:323)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDrive r.java:174)
I have no idea where the employee.mdb file should be put nor how to connect to it. Help please!!! before I end up in jail for severely injuring my instructor
EDIT: I'm using netbeans 6.0 IDE
Re: JDBC Help!!!!
Windows doesn't know where the database is. To set up MS Access for use with ODBC/JDBC, you need to configure ODBC sources. Assuming Win2k/XP, Control Panel->Administrative Tools->ODBC Sources. Add->Microsoft Access Driver, and configure it to point to your mdb file.
Re: JDBC Help!!!!
I figured it was something like that. Thanks!
Edit: That was so easy. It really pisses me off how much time I wasted on this when all my instructor had to do was tell me that little bit... makes wonder WTF I'm paying all this money for.
|All times are GMT -5. The time now is 02:33 AM.|
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.