RPC calls to Sybase fail with unexpected data length

  • I am attempting to execute an RPC from a SQL Server 2000 server to a Sybase System 12 database.  If, in my result set, I have an entry from a nullable char column on the Sybase side, the rpc will fail if the data length of the returned column is less than the total column length

    OLE DB error trace [Non-interface error:  Unexpected data length returned for the column:

    For example, if on the Sybase side I have table A with column INDICATOR defined as char(3) null, and in the stored procedure A.INDICATOR returns the value 'YES', the RPC call succeeds; if the returned value is 'NO', the RPC fails. 

    varchar columns do not seem to cause an error.

    Any thoughts or workarounds would be appreciated.

  • Just a thought.

    Does Sybase have convert function?

  • The problem seems to be using OLEDB.  ODBC eliminates the problem.

  • Just for good measure ... Sybase does have a convert function ...

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply