aspose file tools
The moose likes JDBC and the fly likes Dynamically create ODBC source Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Dynamically create ODBC source" Watch "Dynamically create ODBC source" New topic
Author

Dynamically create ODBC source

Chad Clites
Ranch Hand

Joined: Aug 16, 2005
Posts: 134
I am having difficulty finding the right Google query, so hopefully someone can steer me in the right direction. I am using a database to populate an excel file. Using JDBC:ODBC I am able to read and write from the excel file (and boy did it feel good to get that figured out), I can also create a workbook of n size from a single worksheet(almost as satisfying).

The workbook is built from a relatively simple form, with each subsequent page being a copy of the form, with different information. I can create an ODBC source from the original worksheet using the Administrative Tools in Windows which is fine if my workbook only ends up with one sheet. But if I end up with another sheet, I need to be able to declare that as an ODBC source on the fly. So I think what I am looking for is "create dynamic ODBC source", but that doesn't seem to be returning anything helpful.

Or do I need to just create a default workbook as an ODBC source, add as many sheets to it as will be needed, and then just access each sheet?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

I tried "java odbc without dsn" and this was the first link that Google gave me.

Later: actually reading that link I notice the comment about the code being broken. I suspect it would work better with backslashes instead of slashes separating directory names in that Windows path.
[ July 26, 2006: Message edited by: Paul Clapham ]
Chad Clites
Ranch Hand

Joined: Aug 16, 2005
Posts: 134
Thank you. That worked just fine, as-is and with backslashes both.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Dynamically create ODBC source
 
Similar Threads
How to read and write data with excel?
Generating Insert Script from Excel sheet
Copy excel file to access table
Export to Excel Issue
How to read from an excel sheet in linux?