Jeremy, thanks for the answer.
I've figured out that explicit setting *'CONCAT_NULL_YIELDS_NULL,
ANSI_WARNINGS, ANSI_PADDING' *to* 'on'* makes the thing.
I can pull request method in Sequel::MSSQL::DatabaseMethods
It set params in session:
def set_mssql_params(params_hash)
params_hash.each do |k, v|
run("set #{ k } #{ v }")
end
end
Should I?
вторник, 3 июня 2014 г., 18:46:47 UTC+4 пользователь Yaroslav Zemlyanukhin
написал:
>
> Hi, Jeremy.
>
> I have another issue with stored procedures in mssql.
> Since it is reproducible in Sequel environment and not reproducible in
> tsql shell,
> I decided to dig in different directions.
>
> Some procedure is called by sequel in common way:
> *call_mssql_sproc(:CallCalculator, args: call_calculator_args) *
> And it throws:
> *Sequel::DatabaseError: TinyTds::Error: Error 42999, Level 16, State 1,
> Procedure CallCalculator, Line 49 Message: INSERT failed because the
> following SET options have incorrect settings: 'CONCAT_NULL_YIELDS_NULL,
> ANSI_WARNINGS, ANSI_PADDING'. Verify that SET options are correct for use
> with indexed views and/or indexes on computed columns and/or filtered
> indexes and/or query notifications and/or XML data type methods and/or
> spatial index operations.*
>
> BTW *CallCalculator *procedure is black box for me.
>
> *call_mssql_sproc *generates such expression:
> *DECLARE @RC int; EXECUTE @RC = CallCalculator @CallList=N'<row
> Calling="79121234567" Called="79121234567" Duration="60"/><row
> Calling="79121234568" Called="79121234568" Duration="60"/>'; SELECT @RC AS
> RESULT, @@ROWCOUNT AS NUMROWS*
>
> Attempts ro reproduce this issue manual in tsql shell failed and
> *CallCalculator
> *returns correct result.
>
> But I see *'CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING' *settings
> in exception text so here is a question. Could Sequel set these params to
> values that break procedure functionality?
> What params are set by Sequel on connect?
>
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.