I am calling stored procedure from my .net application to save a record into a table. I got following error message.
Our server is Windows 2003 server and SQL Server is SP4. My stored procedure takes ntext as a input parameter and program is sending an XML string through the input parameter. When I trace through SQL Profiler the calls comes into procedure and aborts immediately after the call and doesn’t go through the procedure at all.
I think the problem is caused by SqlCommandBuilder.DeriveParameters method.
When we use SqlCommandBuilder.DeriveParameters to derive parameter for a SP which has ntext as in parameter , it is always discovering it as nvarchar.
When I changed the parameter to ntext to nvarchar it works fine. Any idea why the deriveParameters method finding the ntext parameter as nvarchar.
This is the error I get.
An error occurred in the following module: table1.Save
Source: DBAccess
Message: A severe error occurred on the current command. The results, if any, should be discarded.
Stack Trace: at DATA.DBAccess.ExecSP(String SPName, ArrayList ParamValues)
at table1.Save(DataSet dsTable1)
Target Site: Void ExecSP(System.String, System.Collections.ArrayList)
Our server is Windows 2003 server and SQL Server is SP4. My stored procedure takes ntext as a input parameter and program is sending an XML string through the input parameter. When I trace through SQL Profiler the calls comes into procedure and aborts immediately after the call and doesn’t go through the procedure at all.
I think the problem is caused by SqlCommandBuilder.DeriveParameters method.
When we use SqlCommandBuilder.DeriveParameters to derive parameter for a SP which has ntext as in parameter , it is always discovering it as nvarchar.
When I changed the parameter to ntext to nvarchar it works fine. Any idea why the deriveParameters method finding the ntext parameter as nvarchar.
This is the error I get.
An error occurred in the following module: table1.Save
Source: DBAccess
Message: A severe error occurred on the current command. The results, if any, should be discarded.
Stack Trace: at DATA.DBAccess.ExecSP(String SPName, ArrayList ParamValues)
at table1.Save(DataSet dsTable1)
Target Site: Void ExecSP(System.String, System.Collections.ArrayList)