Results 1 to 3 of 3
Thread: using jdbc from a jar file
- 08-01-2009, 07:32 PM #1Member
- Join Date
- Jul 2009
- Rep Power
using jdbc from a jar file
I have created an application using swing that uses jdbc. I have created the required database using ms access. I have created a jar file encapsulating all the necessary .class files as well as the database. But now I dont know how to register the database that is inside the jar with ODBC.
Please help me..
- 08-02-2009, 03:42 AM #2
You just pass the JDBC driver the path of the database when you initialise it. Either use getResource() to get the path in the jar, or remove the database file from the jar and try it that way. Assuming you have the correct JDBC driver installed.Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 08-03-2009, 03:44 AM #3
- By jon80 in forum JDBCReplies: 3Last Post: 04-05-2011, 07:55 AM
- By mostafa-sky in forum JDBCReplies: 1Last Post: 03-21-2009, 05:17 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 04-01-2008, 10:17 AM
- By siwa in forum JDBCReplies: 4Last Post: 11-09-2007, 07:31 AM
- By JavaBean in forum Java TipReplies: 0Last Post: 09-28-2007, 12:56 PM