Re: Two questions about moving data between a SQL DB and XML



Thanks for the reply.

I still don't understand what you mean by it's not efficient. What would a
better method of exporting data to a file format for later reimport be?
Efficiency (speed/size) really isn't that important to me. Easy of
implementation and human readability of the exported data is.

"Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx> wrote in message
news:ersUAMuBHHA.5064@xxxxxxxxxxxxxxxxxxxxxxx
Jen,

If you are using the dataset.writeXML method, than just add the schema as
a second parameter, the null columns are not written, but they are used
when you want to import again.

Be aware that this is not such an efficient methode than as Bill told.

I use myself the dataset for another purpose, that did mean that I had to
use normal XML methods (XMLDocument) to make it with empty values.

Cor

"Jen" <none@xxxxxxxxxxx> schreef in bericht
news:ecAy7UsBHHA.4908@xxxxxxxxxxxxxxxxxxxxxxx
This is for a custom database export/import utility I'm writing. So I
need some kind of file format. Is there a better option than XML?

Basically the utility is exporting user-selected records from about a
dozen tables from one database and importing them into another database
some time later. The utility remaps primary key ids and writes the
records into the database. I have the key remapping done, that was easy.
Just trying to figure out how to write the DataSet into the database. I
guess I'll just do it the hard way: loop through records in each table
and INSERT them. I was just hoping there would be a quicker/easier way.

"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxxx> wrote in message
news:OfU8H$rBHHA.1196@xxxxxxxxxxxxxxxxxxxxxxx
Why are you transporting to XML? Why not use some other more compatible
format?


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest
book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
Between now and Nov. 6th 2006 you can sign up for a substantial
discount.
Look for the "Early Bird" discount checkbox on the registration form...
-----------------------------------------------------------------------------------------------------------------------

"Jen" <none@xxxxxxxxxxx> wrote in message
news:uet4IurBHHA.5068@xxxxxxxxxxxxxxxxxxxxxxx
1) I am exporting data from a SQL DB to an XML file. It works great
but it appears that null data in database records does not get put into
the XML. Is there a way to force it to always put the null data there
instead of omitting it?

2) How do I insert the data back into the SQL DB from the XML file?









.



Relevant Pages

  • Re: Two questions about moving data between a SQL DB and XML
    ... This is for a custom database export/import utility I'm writing. ... some kind of file format. ... Is there a better option than XML? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Btrieve legacy migration
    ... The first question is to figur eout your file format and database ... and get the white paper on "Finding Your Database Engine Version". ... do a STAT of one of your data files to determine ... or a description of the file format. ...
    (comp.databases.btrieve)
  • Re: Database Stuff
    ... You don't have to have Access installed to use it's file format. ... Set ogAccess = Nothing ... End Function ' OpenDataBase ... of separate machines such that each person is accessing the same database ...
    (microsoft.public.vb.general.discussion)
  • Re: Working with fixed format text dbs
    ... file format for a commercial database application. ... And also, as you say, if the spec ever does change, the ... You could presumably define a list (of some sort, ...
    (comp.lang.python)
  • Re: MDE not possible ?
    ... If your database is in Access 2000 file format (it should say on ... the database window), Access 2003 cannot convert it to an MDE: ... I know little about a MDE but I think its a database that has ...
    (microsoft.public.access.formscoding)