File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes about odbc connection Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "about odbc connection" Watch "about odbc connection" New topic
Author

about odbc connection

Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 115
hi there.. i'm quite new to database programming with java.. and i wonder... about this connection code...



i see here the part DBQ=c:/SalesInventory.mdb

what if i am to redistribute my software package? it will probably change place...
and for example, i would put the .mdb file within the resources of my .jar application, how can i access it?
i mean, how can i access the resources of my app through code? i already tried the getClass().getResource() its no error but it cant get the database. please help..
all i want to know is how to access the database on the resources... like in VB of the code thanks. :)

This message was edited 1 time. Last update was at by Bear Bibeault

Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 478
Hi..

As far as i know, the only way to connect the access database is through ODBC..
the code is shown as you've already mentioned...
Java is really different with VB, you should configure URL database correctly..

Thanks..


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 115
so it wont work..

it must be pre-configured on the program itself to make it work.. too bad...
thanks anyways for the help...
i would still like to figure out how to make this one work.
Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 115


i see here again another code... and it has no path... what does this mean? :O

This message was edited 1 time. Last update was at by Jhedzkie Skies

 
 
subject: about odbc connection
 
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture