Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    9

    Unanswered: query result to xml file

    I want to store the result of this query
    "select name, age from det for xml raw"
    to a text file test.xml in c:\
    any guesssss!!!

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Execute the command exactly as you've shown it in your program, then have your program stream the results from the statement into the file.

    -PatP

  3. #3
    Join Date
    Oct 2004
    Posts
    9
    I have a to make a job which will do the work for me. The result is to be stored in XML file so when my site user makes a search it can be done in middleware itself..no need to goto backend.
    I have been trying with Job scheduling I had managed to make a file ...but the problem was with LOG which gets appended all the time .
    I have also tried with BCP ...but it has some Character encoding problem.
    Now I'm trying out with OSQL. I donnt knw how to use it but lets see..
    any sugg...

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Is there some reason that you're willing to take the performance hit involved in using middleware to do a job that the database is designed to do for you? It certainly can be done, but most designers prefer the faster response time offered by using the database to solve this kind of problem.

    The short answer is to use your middleware if possible to create the XML file. Have the middleware execute the SQL, then stream the result to a file. IF you can't do that, you can use OSQL.EXE to create the file too, but you'll almost certainly have problems using it.

    -PatP

  5. #5
    Join Date
    Oct 2004
    Posts
    9
    hey !!
    well performance is a issue...since its a search module on a dating site..i need to make it work this way....also its a gud topic for me to experiment something new ...
    OSQL.exe...well i'm trying dat...let me see..
    ty for ya help..

Posting Permissions

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