On 19/12/2007, at 12:59 AM, Rajesh nair wrote:
This code crashes when I do a ns_db select with SQL = “Exec <stored
procedure> @params”.
Crash is such a harsh word, don't you mean "throws an error"? I bet
the error is "... is not a statement returning rows" or similar.
I can do a ns_db exec “exec <stored procedure> @param=value”.
But don’t know how to get the value returned from stored procedure
in that case.
Try this:
ns_db 1row $db "
declare @foo int
declare @bar int
exec my_stored_proc @[EMAIL PROTECTED], @[EMAIL PROTECTED] OUTPUT
select @bar as bar
"
Now you should get back one row with the output of the procedure in
the column "bar".
I am pretty sure this works in Sybase - I used this years ago. Not
sure about the ODBC driver and SQL2005, though.
2. Does that mean ns_db sp_start API (and all the rest of the ns_db
sp_* APIs will not work for MS SQL Server 2005).
Never tried that, so I wouldn't know.
Hope that helps,
Bas.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.