Skip to Content.
Sympa Menu

freetds - Re: [freetds] Issue with return status from stored procedure with awarning message.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Issue with return status from stored procedure with awarning message.
  • Date: Tue, 9 Jan 2007 09:59:39 +0100

>
> I sent this several weeks ago with no response. Am I doing something
> wrong?
>

Nothing wrong. I don't remember first post. I don't know ctlib that much
but I'll try to reply

> -----Original Message-----
> From: Glenn, Chris
> Sent: Tuesday, December 19, 2006 2:23 PM
> To: 'freetds AT lists.ibiblio.org'
> Subject: Issue with return status from stored procedure with a warning
> message.
>
> I have a CT-Lib application that calls a stored procedure. One of the
> arguments to the stored procedure indicates whether or not to begin a
> transaction. The stored procedure, if required, will begin the
> transaction but not do a commit. This will be done later in the
> application flow. The stored procedure returns in the status code the
> key piece of information that the application requires.
>
> When the 'begin tran' is executed, an error code 266 is generated
> (Transaction count after EXECUTE indicates that a COMMIT of ROLLBACK
> TRANSACTION statement is missing...) with a severity level of 16.
> According to Microsoft's documentation (link below), this
> error code is
> just a warning message and can be ignored.
> http://msdn2.microsoft.com/en-us/library/aa258721(SQL.80).aspx
>
> What appears to be happening is that the return status is never
> processed and passed back to my CT-Lib application (I assume)
> because of
> the error code 266.
>
> I've attached the excerpt from the debug log when calling the stored
> procedure with the 'begin tran' mode and without.
>
> Chris Glenn
> <<SP with begin trans.txt>> <<SP without begin trans.txt>>
>
>

Watching code ctlib make a result set to return return status. Return
status is usually one of the last tokens to perhaps you can get the
return status after reading error and processing another result set. If
you only read rows perhaps ctlib doesn't go to next recordset so you
have to call ct_results.

freddy77




  • Re: [freetds] Issue with return status from stored procedure with awarning message., ZIGLIO, Frediano, VF-IT, 01/09/2007

Archive powered by MHonArc 2.6.24.

Top of Page