Help with Java application to connect to a database
Hi, I'm trying to write a Java application to connect to a database that resides on our network server. I've been able to connect to the database in question from my client PC using the basic connection code:
I created a DSN on my client computer named TEST that mapped a network drive to the database that I wanted to use. All is well! My question is, since there are a fair number of client computers in my network, how can I rig it so that I can connect to the DSN on the server?
Connection conn = DriverManager.getConnection("jdbcdbc:TEST");
I'd really rather not have to create a DSN on every single client computer, and I'm assuming that there is a way to do this, since it would be really dumb if there wasn't. So if anyone can give me the syntax on how to work this, i'd be delighted. I'm connecting to an access database. One site suggested doing this:
I thought the syntax was a little messy looking but I tried it and it didn't work. Thanks.
Connection conn = DriverManager.getConnection("jdbcdbc:;Driver=Microsoft Access Driver (*.mdb);DBQ=E:/Databases/TestInv.mdb");