Two Laptop Bag*
The moose likes Jython/Python and the fly likes Python script for to make a copy of DB2 database to MS Access format. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Python script for to make a copy of DB2 database to MS Access format." Watch "Python script for to make a copy of DB2 database to MS Access format." New topic
Author

Python script for to make a copy of DB2 database to MS Access format.

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 411

I have a DB2 database and I need to make a weekly copy of that in MS Access database format. Is there any way or is there any library. I have heard python is very fast and easy to use language so I thought may be there is some option available?


Pawan Chopra
SCJP - DuMmIeS mInD
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

Python has a Database API and has a DB2 driver. I'm not sure about Access. Is CSV an option or perhaps ODBC?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 411

Joe Ess wrote: Is CSV an option or perhaps ODBC?


Not really. We actually wanted to give this backup to some of the users who can do ad hoc reporting using access database. Is there any other simple but fast way to do this?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

I would put money on Access being able to open CSV files which you could save as an Access file. The ODBC link above specifically mentions Access.
I've had good results using Microsoft Data Transformation Services (now SQL Server Integration Services) to do database export/import. That would probably be the simplest method.
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 411

Thanks Joe. I have decided to export csv from db2 and then import it in access. Just one more question is python better for exporting data than java?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

Define "better". Both languages have features for getting data out of a database and putting data in a file, so from a feature standpoint, they're pretty much even. Personally, I tend to use Python as a scripting language, automating repetitive tasks and I use Java for more enterprise level tasks like fully featured applications. This is not to say Python can't be used to make fully featured applications, it's just that I tend to use Java for that task.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Python script for to make a copy of DB2 database to MS Access format.