This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes ODBC DSN Programmically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ODBC DSN Programmically" Watch "ODBC DSN Programmically" New topic
Author

ODBC DSN Programmically

Stephen Batsas
Ranch Hand

Joined: Jan 22, 2002
Posts: 117
Hi
Can anyone please help me?
I need to create a ODBC DataSource from within Java/JDBC App. I have searched this forum but all I could find are vague suggestions.
Regards
Stephen
SCPJ
SCWCD
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

You may find a technique to create a DSN, but you will NOT be able to create the file it needs to point too.
Technically you can do this by creating an external script that calls a DLL in the windows system directory. and executing that script to create the mdb file when you wish.
Dana Hanna
Ranch Hand

Joined: Feb 28, 2003
Posts: 227
Create an ODBC connection to what? A brand new DB? If so that would require creating an Access database or something else with an ODBC driver.
If an existing DB - you can have your program edit the c:/windows/odbc.ini file to put what you need there.
I am wondering why you'd need this. As part of installation?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ODBC DSN Programmically
 
Similar Threads
How to rollback multiple prepared statements
Interesting Ads
Direct Me To ODBC Driver Source
Oracle ODBC Driver Problems. Please help
How to connect msaccess database from myeclipse IDE tools