To pass the xml file as a parameter to the storedprocedure, you have to use openxml() in stored procedure-
use this procedure more that-
create procedure dbo.up_Insert_Company(@xmldata ntext)
as
begin
declare @FileHandle int -- Filehandle to the xml stuff
/* convert the xml data into a recordset */
exec dbo.sp_xml_preparedocument @FileHandle output, @xmldata
insert into dbo.categories
select * from openxml(@FileHandle, '/record')
with dbo.categories
end
/*
And here's how you execute the SQL...
*/
dbo.up_Insert_Company '<record CategoryName=''Sample Insert'' Description=''Testing'' />'
use this procedure and let me know.