Database to INI file
March 31, 2011 7:23 AM   Subscribe

How could I export a Access Database to an ini file?

I need to create an ini file from a database.

The column titles would be the items and the ID number would be the group.

Any ideas on how to do this?
posted by millerizer to Technology (6 answers total)
 
You might need to be a bit clearer.

ini files look like

[section]
prop=string|int|other value
[section2]
prop=string|int|other value


So what does a row map to ? What's your DB look like ? (Or, what are you trying to do that you'd want to try this ?)..
posted by k5.user at 7:37 AM on March 31, 2011


Are you sure you don't just want it in a CSV (Comma seperated values)?
Then you would just have rows of data, with fields seperated by a delimiter(a comma).
posted by utsutsu at 7:52 AM on March 31, 2011


You can't. Export it to a csv and write a script that will put it in whatever weirdo format you like. ini for database? ugh.
posted by damn dirty ape at 8:56 AM on March 31, 2011


Response by poster: Yea it has to be an ini file:

[1]
Column1=Blah
Column2=Blahdidy

[2]
Column1=Bleh
Column2=Blehdidy

and so on.
posted by millerizer at 8:57 AM on March 31, 2011


The only other way would *maybe* be to write a report... otherwise you are looking at writing custom VBA code to do the export, or an external script as damn dirty ape suggests.
posted by utsutsu at 8:58 AM on March 31, 2011


The normal way to do this would be to write a VBA function that creates the file and loops through the database table, printing each row as you describe. VBA handles creating and writing files quite nicely. If you don't know VBA, I don't think there's a nice easy option for generating the file.
posted by fatbird at 9:16 AM on March 31, 2011


« Older Ubuntu on netbooks   |   How to upgrade my jailbroken/unlocked iPhone 3g... Newer »
This thread is closed to new comments.