Exporting and Importing XML file using ADO

Exporting and Importing XML file using ADO

Post by Clément Dos » Sat, 16 Nov 2002 05:11:05



Hi,

I am using ADO 2.6 SAVE method to export a table in XML format.
Now I need to import it in another database. How Can I do It? Is there a
Load xml file? The files are huge. The small one has 318MBytes. I tried
XMLBulkLoad but the XML generated by ADO Save method is incompatible.
I have to change most of it in order to run.

Saving this 318MBYtes table took less than 8 minutes.
If there is a ADO Load method would it be as eficient? If not please
suggest me a better way to export and import XML files.

Best regards,
Clment

 
 
 

Exporting and Importing XML file using ADO

Post by Val Mazu » Sat, 16 Nov 2002 05:40:50


Clment,

There are several ways to do that. In case of big amount of data, like in
your case, you could use SQL DTS COM library to do that. But it requires
license for SQL Server. DTS allows to transfer data between different data
sources and work fast.
Another way (but it will be slow) is to save XML file, as you did right
know. But if you need to save that information into another database, then
it requires some chages in XML. If you need example how to use that
technique, then let me know by-email and I will send you example how to
*switch* recordset from one database to another one. It is oo big to post it
here

--
Val Mazur
Microsoft MVP


Quote:> Hi,

> I am using ADO 2.6 SAVE method to export a table in XML format.
> Now I need to import it in another database. How Can I do It? Is there a
> Load xml file? The files are huge. The small one has 318MBytes. I tried
> XMLBulkLoad but the XML generated by ADO Save method is incompatible.
> I have to change most of it in order to run.

> Saving this 318MBYtes table took less than 8 minutes.
> If there is a ADO Load method would it be as eficient? If not please
> suggest me a better way to export and import XML files.

> Best regards,
> Clment


 
 
 

1. Importing text files into SQL Server 2000 Database using DTS Import/Export Wizard

   I'm having a problem with exporting data from text files(received
by e-mail) into SQL Server 2000 Database. These files
were created by dumping the data from SQL Server 7
tables. Each row of
these files has a fixed length and  no special delimeters
between the fields - only spaces.The Wizard detected the import file as a
file with delimited fields(Screen "Select file format"). The next screen of
the Wizard detected the column
delimeter as "other", but I couldn't detect the character. As
soon as put in the delimeter field spaces, it gave me the wrong
number of colums in the result SQL Server Table( = junk).
    If I defined the file as a file with fixed length, the next screen
of  the Wizard I got the fields with
offset(they were not left justified). When I copied this file into
the database, I got the table with the wrong number of fields
and rong data in them.
Can anybody tell me, what is the problem and is it really
possible to import the data this way ?

Any suggestions are appreciated.

Sergei Cher

2. JDBC problem

3. ADO recordset import/export to XML

4. Anyone already found SQL-Server Desktop?

5. Import/Export XML formatted files

6. Clustering and Cyrstal Reports

7. export/import to/from XML file

8. How do I turn off caching on NT4 W/S ?

9. Database bulk import / export using XML

10. export data from Access into an XML file with ado

11. DB size problem using ADO import to Access 2K (XML source)

12. Using DTS to export a XML format file.

13. Importing/exporting data from/to SQL server using ADO