Question : Load XML file into sqlserver 2008 Database using c#

I am trying to load an XML file into a sqlserver database

I have built the follwoing table in sqlserver to hold the file
CREATE TABLE [dbo].[XML_FILE](
      [XML_ID] [int] IDENTITY(1,1) NOT NULL,
      [XML_FileDirectory] [nvarchar](2000) NULL,
      [XML_FileName] [nvarchar](2000) NULL,
      [XML_FILE] [xml] NULL)

and I am able to locate the file
fileStream = new FileStream( "Filename", FileMode.Open, FileAccess.Read);

but not sure how to load this file into the sqlserver database and if I have created the xml_file table with the right datatype to hold the file.

any help would be appreciated.

Answer : Load XML file into sqlserver 2008 Database using c#

As long as you don't power the old server back on after you remove the storage, and you don't sign or otherwise modify the disks while they are in the 2008 box, you should have no problem seeing them if you put it back in the old server.


As far as the probably of seeing them on the new box, I'd say it's ~80-90%.  Sometimes windows gets flaky about drives full of data just "showing up", but mostly it's ok.  But yes, definitely you'll have to fix the drive letters, that's stored in the OS, not the RAID controller.


HTH,
exx
Random Solutions  
 
programming4us programming4us