On Tuesday, June 3, 2014 7:46:47 AM UTC-7, Yaroslav Zemlyanukhin wrote:
>
> 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?
>

Sequel does not set such params when setting up the connection.  Maybe the 
underlying driver does though?  Looks like you are using TinyTDS, and 
searching for those strings doesn't bring up anything in TinyTDS's 
codebase, but maybe they are set at a lower level in FreeTDS?

Try using TinyTDS directly and see if you can recreate the issue.  If so, 
you'll need to talk to the TinyTDS maintainers and see what their advice 
is.  If you can get it to work with TinyTDS directly but it still fails 
when you are using Sequel, please post your TinyTDS code and I'll see if I 
can figure out how to get it working in Sequel.

Thanks,
Jeremy

-- 
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.

Reply via email to