Results 1 to 2 of 2
Thread: Setting the DSN
- 01-30-2008, 12:17 PM #1
Setting the DSN
Hello everyone.
I'm self-studying JDBC and in the books and tutorials it says that the DSN for a database system must be set on the operating system, Windows in my case. How can this be done by Java code? I don't think that the end user should be doing this technical work. :rolleyes:
Thank you. :DEyes dwelling into the past are blind to what lies in the future. Step carefully.
- 02-14-2008, 09:55 PM #2
Hi Tim, just in case you never found the answer to this. Strictly speaking you cannot set the DSN from Java but what you can do is make a JDBC connect without a DSN, usually referred to as a DSNless connection. In this case you specify from code the details that you would have put in th eDSN, e.g.
Masses on the net under dsnless connections if you need moreJava Code:String connectionString = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/dbs/salaries.MDB"; DBConn = DriverManager.getConnection(connectionString);-- Hope that helps
Similar Threads
-
JTextArea setting
By newtojava7 in forum New To JavaReplies: 1Last Post: 01-29-2008, 02:57 AM -
Help with setting up Java
By itmasterw in forum New To JavaReplies: 6Last Post: 01-18-2008, 11:04 PM -
Help with setting up please
By BlitzA in forum New To JavaReplies: 6Last Post: 12-29-2007, 12:54 PM -
Setting cookies in JSP
By Java Tip in forum Java TipReplies: 0Last Post: 12-10-2007, 05:33 PM -
Setting currency
By Java Tip in forum Java TipReplies: 0Last Post: 11-16-2007, 02:08 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks