Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Question Unanswered: stored procedure to read and write between XML and SQLServer

    Hi All,
    I need some help from you experts.

    I need to develop something that reads from xml files and writes in to sqlserver, also it should read from SQLServer and writes to xml.

    I should be able to give this as a job to exectue daily ,etc.

    Can we do this using stored procedures in SQLServer.
    Pls paste some sample code, if any or direct me to any url with better info.

    Thanks in advance

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    This sounds like an assignment to me. Can you post what the teacher assigned verbatim so we have a better chance of giving you good advice?

    -PatP

  3. #3
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Angry

    Come on guys...
    I just need to know the techniques for reading and writing from SQLServer to to XML and vice versa using stored proc.
    Just to get started friends.......


    Regards

  4. #4
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Thumbs up

    I would be grateful if someoen points me to some material for this..

    Thanks in advance

    Benny

  5. #5
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Well what technologies do you have available to you? Stored procs aren't what I would use but then it really depends what else you have to work with...

    Pat, although being a little harsh was quite right in his post... give us more details and we will be able to give you better advise... otherwise we might just explain how you would do it using FORTRAN or something...

  6. #6
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Smile

    Hi Rokslide & Pat...
    Thanks for the comments....no issues

    Ok i ll explain..

    We have a project in which we need to give a daily feed of XML from our sqlserver database to another machine.....so that that data moves to our headquarters.
    Similarly we need to pick updates from the xml and update our sqlserver application data.

    I need to develop the push and pull sequence for this.
    It would be good if it can be done at the SQLServer level using stored proc or somehting else.
    But if this is complciated, im ready to implement it using .NET

    Regards

    Thanks in advance for all the advices.

    Benny

  7. #7
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    you are just in luck www.sqljunkies.com has been running a series for the last couple of months on xml in sql

    try this Link for starters...

  8. #8
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Personally if it was me I'd look at getting a dts package to do the job....

  9. #9
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Thumbs up

    Yea thats what i too thought....to get some stored procedures workign to do the stuff, and call them from DTS...lemme know if it can be more directly done from DTS

    Thanks in advance!

  10. #10
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Well I'd get an activeX script to read in the XML using the MSXML parser component and then get that to call store procedures using ADO.

    In theory you could probably avoid the stored procs completely but I don't know if it would be better or worse....

  11. #11
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Smile

    Does anyone have any samples on this? ActiveX script or whatever
    Last edited by bennydubai; 03-29-04 at 07:16.

  12. #12
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd suggest looking at the XML Files article for ideas. It should at least get you started thinking.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •