Connection Setting with SqlConnection

  • Thread starter Thread starter Paolo Taverna
  • Start date Start date
P

Paolo Taverna

Hello

..Net Framework 1.1 and SQL Server 2000 SP3a
I use the SqlConnection, SqlCommand, SqlDataAdapter,
Dataset to connect to a SQL Server and Call there a
Stored Procedure that produce a Resultset that i catch
in a Dataset.

The Connection Behavior with SqlConnection is that
concat_null_yields_null will be set to on. I have to put
as first statement in the SQL Server stored proc the statement:
set concat_null_yields_null off

Is there a possibility to set this as a property with the SqlConnection
or SqlCommand object ?

Best Regards
Paolo Taverna
 
Unfortunately no. And, you cannot set it in a stored procedure either, as
the sproc will recompile every time. The suggested method is to us ISNULL()
in your SQL statements or sprocs to avoid having to set this every time. A
bit more coding on the T-SQL for a lot less headache.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 
Back
Top