|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
set ansi null offI need to use the ansi nulls in off to compare some register with null using '=', this is my enviroment: I call the SP from .net 1.0 object using sqlclient the SP has in the header the, SET ANSI_NULLS OFF but when I compare using the = there is no response, actually the SP doesn't change the ansi null to OFF, is set to ON by default, if I call the select...where... directly from the query analizer it works, but using a SP and .NET not. I make a profiler and I find in every connection the -- network protocol: TCP/IP set quoted_identifier on set implicit_transactions off set cursor_close_on_commit off set ansi_warnings on set ansi_padding on set ansi_nulls on set concat_null_yields_null on set language us_english set dateformat mdy set datefirst 7 HOW CAN I USE THE SET ANSI NULL OFF IN A SP?, thanks in advanced for service and support Felipe Arguello Andres,
Be really careful. Take the time necessary to solve this puzzle and you will see what you can expect from setting ANSI_NULLS to off. A NULL Puzzle http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/4693f68a7140bb80?hl=en&lr=&frame=right&seekm=%23kGO0jLvCHA.2868%40TK2MSFTNGP12 AMB Show quote "Andres Felipe Arguello" wrote: > Hi, > I need to use the ansi nulls in off to compare some register with null using > '=', this is my enviroment: > I call the SP from .net 1.0 object using sqlclient > the SP has in the header the, > SET ANSI_NULLS OFF > but when I compare using the = there is no response, > actually the SP doesn't change the ansi null to OFF, is set to ON by > default, if I call the select...where... directly from the query analizer it > works, but using a SP and .NET not. > I make a profiler and I find in every connection the > -- network protocol: TCP/IP > set quoted_identifier on > set implicit_transactions off > set cursor_close_on_commit off > set ansi_warnings on > set ansi_padding on > set ansi_nulls on > set concat_null_yields_null on > set language us_english > set dateformat mdy > set datefirst 7 > > HOW CAN I USE THE SET ANSI NULL OFF IN A SP?, > thanks in advanced for service and support > > Felipe Arguello > > > Thanks,
Actually I loose my time trying to make set ansi null off works, thanks, nobody recognize that this doesnt work and the microsoft documentation are wrong. I'll probably rewrite the SP using conditionals and without parameters=null, Felipe Arguello "Alejandro Mesa" <AlejandroM***@discussions.microsoft.com> wrote in message http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/4693f68a7140bb80?hl=en&lr=&frame=right&seekm=%23kGO0jLvCHA.2868%40TK2MSFTNGP12news:C0EC2FA8-9B5A-4AD5-847F-6168416939C7@microsoft.com... > Andres, > > Be really careful. Take the time necessary to solve this puzzle and you will > see what you can expect from setting ANSI_NULLS to off. > > A NULL Puzzle > Show quote > > > > AMB > > "Andres Felipe Arguello" wrote: > > > Hi, > > I need to use the ansi nulls in off to compare some register with null using > > '=', this is my enviroment: > > I call the SP from .net 1.0 object using sqlclient > > the SP has in the header the, > > SET ANSI_NULLS OFF > > but when I compare using the = there is no response, > > actually the SP doesn't change the ansi null to OFF, is set to ON by > > default, if I call the select...where... directly from the query analizer it > > works, but using a SP and .NET not. > > I make a profiler and I find in every connection the > > -- network protocol: TCP/IP > > set quoted_identifier on > > set implicit_transactions off > > set cursor_close_on_commit off > > set ansi_warnings on > > set ansi_padding on > > set ansi_nulls on > > set concat_null_yields_null on > > set language us_english > > set dateformat mdy > > set datefirst 7 > > > > HOW CAN I USE THE SET ANSI NULL OFF IN A SP?, > > thanks in advanced for service and support > > > > Felipe Arguello > > > > > > |
|||||||||||||||||||||||