how to export from mdb to xml

Hello all!

I'm looking for a way to use the export func in ACCESS from inside a cpp code.
I need to export a table to XML.

For now, all that I came up with is an SQL command which export the table to excel:
CDatabase db;
CString SQL;
SQL = "SELECT * FOR XML PATH(Service), ROOT(Services) queryout c:\\customers.xml FROM Tmp_Wire_Out";
SQL = "SELECT * INTO "
"[Excel 8.0;HDR=Yes;DATABASE=c:\\customers.xls].[Sheet1] "
"FROM [Customers]";
try
{
db.OpenEx( "Driver=Microsoft Access Driver (*.mdb);"
"DBQ=c:\\kmidwgs.mdb;", CDatabase::noOdbcDialog );
db.ExecuteSQL( SQL);
}

I was wondering, maybe anyone here knows how to change this line so it will export to XML?
Or maybe someone knows how to do it some other way?

I would really appreciate it.
Thanks in advance!
Topic archived. No new replies allowed.