Click here to Skip to main content
15,879,535 members
Articles / Desktop Programming / MFC
Article

Database to XML Exporter

Rate me:
Please Sign up or sign in to vote.
1.14/5 (8 votes)
2 Aug 2001 76.8K   1.7K   27   7
Learn how to export database fields to XML document

Screenshot

Introduction

This code exports database fields to XML document. You can use this code for data export processes. I used Microsoft Visual C++ 6.0 for coding. Let me give some information about code;

I used db2xml.mdb as a sample database. Database has one table and that table has two fields, named Name, Surname. I used ADO 1.5 for connecting to database and again i used MSXML 3.0 for exporting data from database. Maybe you should change some code in stdafx.h. Because it has two hard coded #import directives like that;

// Import DLL File
<FONT color=#0000ff>#import</FONT> "C:\Program Files\Common Files\System\ado\msado15.dll" \
no_namespace \
rename( "EOF", "adoEOF" )

<FONT color=#0000ff>#import</FONT> "c:\winnt\system32\msxml3.dll" named_guids raw_interfaces_only
<FONT color=#0000ff>using namespace MSXML2;</FONT>

Last note; copy db2xml.mdb and db2xml.exe files into same directory.

What You Need:

Have an installed MDAC and MSXML 3.0

Lets meet at new projects, i hope.

Please send any comments or bug reports to me via email.

I'm VC++ Programmer.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior) ASTRON
Turkey Turkey
I'm working at Yasar Holding IT department as senior SAP R/3 BASIS and Development Consultant and system integrator. I have experience on C/C++ for 6 years. Implementing and inviting new technologies is most biggest part of my life. Object oriented paradigm is a philosophy of my vision.

Comments and Discussions

 
GeneralMemory management lacks Pin
Aydin Bakir22-Jul-02 0:17
Aydin Bakir22-Jul-02 0:17 
GeneralRe: Memory management lacks Pin
Orkun GEDiK29-Jul-02 18:58
Orkun GEDiK29-Jul-02 18:58 
GeneralError.. 'IXMLDocument' : ambigous symbol Pin
Nyrup18-Jun-02 20:01
Nyrup18-Jun-02 20:01 
Hi,
I get these types of errors when trying to compile the program. Any idear why? It is not just this XML app but nearly all soucecode with XML gives me these errors.

Any help will be highly appreciated.

/Nyrup
QuestionWhere is code? Pin
Koundinya8-Jan-02 20:12
Koundinya8-Jan-02 20:12 
GeneralUse _Recordset Save Method Pin
Rashid Thadha19-Jul-01 22:31
Rashid Thadha19-Jul-01 22:31 
GeneralRe: Use _Recordset Save Methid Pin
Orkun GEDiK20-Jul-01 2:56
Orkun GEDiK20-Jul-01 2:56 
GeneralRe: Use _Recordset Save Methid Pin
2-Aug-01 5:07
suss2-Aug-01 5:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.