in stored procedure check whether emptystring or not if(@yourparamname = '') set @yourparamname = null;
and another way is using like nullif(@yourparamname,'') On Wed, Aug 27, 2008 at 11:58 PM, SAN <[EMAIL PROTECTED]> wrote: > > > I am getting an error as > "XML Document must have a top level element.Could not find prepared > statement with handle 0." while using an SP. Sp accepts ntext input > parameters.The value for this ntext parameters come from strings > assigned as my Dataset.getxml.In <http://dataset.getxml.in/> some cases I > dont require some > datasets to be passed.In that case i pass the string as > System.DBNULL.value.tostring > > And in my SP i am checking > > IF @dataSSDTL IS NOT NULL > begin > exec sp_xml_preparedocument @hDoc output, @dataSSDTL > > ---- > > -- > end > > > I am using sqlhelper.executenonquery to call the SP. > I think the problem is that ntext input parameter of SP is not getting > the value as NULL. instead its getting as empty string.If I am passing > this parameters from VB.NET <http://vb.net/> as string, how can I handle > this issue.. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://cm.megasolutions.net/forums/default.aspx -~----------~----~----~----~------~----~------~--~---
