Connection Setting with SqlConnection

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
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

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!
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top