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 ODBC configuration.help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ODBC configuration.help" Watch "ODBC configuration.help" New topic
Author

ODBC configuration.help

henry akoma
Greenhorn

Joined: May 17, 2005
Posts: 21
hi,
i have tried configuring my ODBC, but bcos their are so many option(user DSN, System DSN, File DSN, etc) and so many things in the ADD button, i am really confused as per which to use and each time i try any option my program gives an error.

i dont know if this is the best forum for me to ask for a step by step ODBC configuration assistance, but i will appreciate it if someone helps me out. i just want to write a simple transaction program and i have been on it for too long.

i already have used the code
but another problem i have is where to specify as my url
does the program create the data source for me or do i create it by another means .

please i need help in this area.
thanks for your cooperation
[ September 22, 2005: Message edited by: Bear Bibeault ]
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

You are better off creating a system dsn. That is accessible by all users and all applications on your system. Create this in the ODBCAdmin app in the control panel and call it something like "MyDSN".

Your URL to access it will then by jdbc dbc:MyDSN

You have to get a connection to the database by doing something like:

Connection connection = DriverManager.getConnection(url);
Tom Blough
Ranch Hand

Joined: Jul 31, 2003
Posts: 263
Henry,

What database are you using? With that information we can give much more specific instructions.

Cheers,


Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
henry akoma
Greenhorn

Joined: May 17, 2005
Posts: 21
thanks for your contribution.

i am actually new to database technology, so i dont know if i can be specific about the database i am using but i will try to paint a good scenario of what i am doing.

i have written a program using the oracle sotware(sql).i have saved it as C:\sql\coffees.sql. i now want to use java to both retrieve data and modify data in that file.

another huddle i need to cross now is to determine which driver to choose from in the ADD button of the System DSN window.

is this infomation enough, if not i am ready to answer any questions. thanks.
henry akoma
Greenhorn

Joined: May 17, 2005
Posts: 21
hey guys, thank you so much, i have finally gotten a good run of the program.
i appreciate your contributions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ODBC configuration.help
 
Similar Threads
database connection through simple ejb on weblogic5.1
how to create dsn at runtime
need help connecting to Access DB
Can I use jdbc:odbc to access MS Access database remotely?
dynamic creation of Data Source Name(DSN) programatically , help needed urgent