HiI have some trouble with a stored procedure that I could use some help with. My sp look like this...p_BulkInsertPD (@PData ntext)AS DECLARE @hDoc int exec sp_xml_preparedocument @hDoc OUTPUT,@PData SET NOCOUNT ON; INSERT INTO tbl_PD_Answers(NodeID, AprovalID, FaultID, Grade, MeasureID, ProtocolID) --(KEEPNULLS)SELECT * FROM OPENXML(@hDoc, 'ROOT/PROT/PD',1) WITH ( NID Integer , AID Integer , FID Integer , GID integer, MID integer, PID integer ) XMLEmp EXEC sp_xml_removedocument @hDoc
The procedure itself works, but it doesnt work when I pass on empty values in a column that expect a integer, then I get a error on my aspx page that says "Conversion failed when converting the nvarchar value 'NULL' to data type int." Do I need to add a keppnulls to my sp? In that case where do I do that? Sorry if this turn out to be a .net problem, but I don't know where to start.Regards