how to write Microsoft Access MDB file to a text file, using C ?


 
Thread Tools Search this Thread
Top Forums Programming how to write Microsoft Access MDB file to a text file, using C ?
# 1  
Old 07-18-2009
how to write Microsoft Access MDB file to a text file, using C ?

I'm in the UNIX environment. I'd like to read a Microsoft Access MDB file, and write the contents of that file into an ASCII text file. I want to write a C program to do this.

Does anyone know if there's already source code out there that does this?
Please advise. Thanks.
# 2  
Old 07-18-2009
Check out ODBC libraries for your system - see
Accessing microsoft access from C program

Openoffice.org also has a database component that can read & write access files.
# 3  
Old 07-18-2009
I should explain my problem better by describing what I'm doing:

My platform is on Solaris. I have already written C codes to
interpret data AFTER they got extracted from Microsoft Access. The way
it's done right now, is that the users have to go to a Windows PC, copy that MDB file onto the network drive on Solaris, open up MS Access, export each MDB file into a text file on the network drive on Solaris.

Because the Access data has several sets of data on each file, it's cumbersome for the users to do the output to ASCII text for every file.

Then, these users would run my C program to intepret all of that data (in ASCII text format). So I'd like to make it easier for the users when they export the MDB file.

And the way to do it is to copy each MDB file to the network drive on Solaris, read the Access mdb file from a C program on Solaris and
automatically output that MDB file into a text file, and then, this is tied into the second C program, which interprets that text file.

So I'm interested how to write the C program to read the MDB file and writing its content into an ASCII text file.

---------- Post updated at 05:50 PM ---------- Previous update was at 02:30 PM ----------

Or better yet,

Is there a tool or command in line mode in the C shell that I can type that will convert an MDB file into a text file?
# 4  
Old 07-19-2009
I would suggest that you write a utility to extract/convert the data on the Windows platform rather than on your Solaris platform.

Quote:
Is there a tool or command in line mode in the C shell that I can type that will convert an MDB file into a text file?
None that I am aware of.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

How to write in other language in text/xml file by reading english text/xml file using C++?

Hello Team, I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file. Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies

2. Shell Programming and Scripting

Need help to write a shell script to convert text file to excel file.

Hi Everyone, I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet. Example input: IpAdress:InstanceName:Port:ServerName 10.255.255.1:abc:2232:xyz_abc Output should be an excel sheet like below: Column... (8 Replies)
Discussion started by: akabhinav18
8 Replies

3. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

4. Shell Programming and Scripting

Extract text from file then write variable

I have a text file that has many lines, and for each line I need to extract different sections of text, then write several variables from the data. I can split out the various sections by selecting their position on each line as the column sizes will never vary. A sample of my text file is below... (2 Replies)
Discussion started by: kcpoole
2 Replies

5. Shell Programming and Scripting

Connect Perl with MS Access (.mdb file)

Hi Guys, How All are Doing In Perl I am getting an issue that I want to share with all you guys. I have a .mdb file(MS Access) that contain many tables. With the help of Perl I want to Connect that mdb file and after Connecting I want to fire a sql query lets say (select * from Table1). ... (3 Replies)
Discussion started by: adisky123
3 Replies

6. Shell Programming and Scripting

how read specific line in a file and write it in a new text file?

I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting? file1.html <head> <url>http://www.google.com</url> </head> file2.html <head>... (6 Replies)
Discussion started by: vel4ever
6 Replies

7. Shell Programming and Scripting

How to write a script for text file encryption?

Hi All, I have zero knowledge in UNIX, so i desperately need the help from you guys. I need a script which can encrypt all the text files in one shot in a source directory. After all the text files are encrypted, they will be put into a separate folder. Command involve: gpg with -a,... (6 Replies)
Discussion started by: shanbalao
6 Replies

8. Shell Programming and Scripting

match text from two files and write to a third file

Hi all I have two files X.txt and Y.txt. Both file contains same number of sentences. The content of X.txt is The filter described above may be combined. and the content of Y.txt is The filter describ+ed above may be combin+ed. Some of the words are separated with "+"... (2 Replies)
Discussion started by: my_Perl
2 Replies

9. Solaris

file open/read/write/close/access by process

Hi want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris. Purpose : while running perf. test, needs to find where is the bottleneck. We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Discussion started by: raxitsheth
1 Replies

10. Cybersecurity

file permission/acl: 2 users with write access on 1 file...

Hello, i need some help/advice on how to solve a particular problem. these are the users: |name | group | ---------- --------------- |boss | department1 | |assistant | department1 | |employee | department1 | |spy | department2 | this is the... (0 Replies)
Discussion started by: elzalem
0 Replies
Login or Register to Ask a Question