Exporting a largish dataset to xml

Discussion in 'Databases' started by DanInManchester, Mar 28, 2010.

  1. #1
    I'm using MS SQL 2005 and ASP.Net 2.0

    I have a dataset of that I need to get into a business model on mass.
    Invoices collection - Invoice Item - InvoiceItems - Invoice Item

    e.g. 5000 invoices to which I need to add the invoice items for each invoice.

    I've done this before using the ADO SHAPE command but I'm wondering if this is the best way?
    I also need to consider that it will scale to other platforms so alternatives would be useful.

    Clearly I dont want to have 5000 hits on the database and at the same time I don't want to do any silly itteration.

    What do you suggest?:confused:
     
    DanInManchester, Mar 28, 2010 IP
  2. RichieTech

    RichieTech Guest

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hay Dan,

    Its not a big deal but yes that possible and can be achieved by designing a small application.
    Its totally a coding part but we can help you to design required database if you provide complete information of your application :)

    Regards,
    R
     
    RichieTech, Apr 9, 2010 IP
  3. DanInManchester

    DanInManchester Active Member

    Messages:
    116
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    I'm more curious about the most effective database query than the application itself.

    Exporting the xml is a walk in the park with .net and I already have lots and lots of feeds with thousands of records. The problem I hve is that I want to add subsets of detail to some of these feeds.

    Update :

    Lets assume I have this as a feed

    <invoices>
    <invoice>
    <id>1</id>
    <name>my name</name>
    <issued>12/05/2009</issued>
    <paid>yes</paid>
    </invoice>
    ...... up to ....
    <invoice>
    <id>19513</id>
    <name>my name</name>
    <issued>12/05/2009</issued>
    <paid>yes</paid>
    </invoice>
    </invoices>

    but I want to add to this invoice items

    <invoices>
    <invoice>
    <id>1</id>
    <name>my name</name>
    <issued>12/05/2009</issued>
    <paid>yes</paid>
    <invoiceitems>
    <invoiceitem><id>1</id><name>Some item 1</name><value>18.90</value></invoiceitem>
    <invoiceitem><id>2</id><name>Some item 2</name><value>17.99</value></invoiceitem>
    <invoiceitem><id>3</id><name>Some item 3</name><value>15.90</value></invoiceitem>
    <invoiceitem><id>4</id><name>Some item 4</name><value>15.90</value></invoiceitem>
    </invoiceitems>
    </invoice>
    ...... up to
    <invoice>
    <id>19513</id>
    <name>my name</name>
    <issued>12/05/2009</issued>
    <paid>yes</paid>
    <invoiceitems>
    <invoiceitem><id>1</id><name>Some item 1</name><value>11.95</value></invoiceitem>
    <invoiceitem><id>2</id><name>Some item 2</name><value>12.99</value></invoiceitem>
    <invoiceitem><id>3</id><name>Some item 3</name><value>15.90</value></invoiceitem>
    </invoiceitems>
    </invoice>
    </invoices>
     
    Last edited: Apr 9, 2010
    DanInManchester, Apr 9, 2010 IP