Results 1 to 6 of 6

Thread: Storing text file containing XML in SQL Server db

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2003
    Posts
    2

    Unhappy Storing text file containing XML in SQL Server db

    Hi all,

    I am trying to store the contents of a text file into a field in a SQL Server database. I am not sure what sort of data type to use in the database. I tried using an image field but I couldn't seem to get the text out again (not really sure it went in in the first place.)

    Thanks for any help in advance.

    Cheers
    SpiderBear.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    You could use a BLOB to store the entire file as it is, or to store the contents, make the field VARCHAR(somevalue).

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You could also use text or ntext.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    I've heard of SQL 2000's support for XML, but what really is it? Have they modified their T-SQL to allow for this or what?

  5. #5
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    There is a FOR XML set of keywords in the T-SQL that will extract data as XML but it doesn't store it as such (as far as I know).

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Pfft... MS buzzwords.

Posting Permissions

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



Click Here to Expand Forum to Full Width