Resources for IT Professionals > Forums Home > Microsoft Research Forums > How-to Help > SSRS - facing issue while passing an INT parameter value to SYBASE SP
Ask a questionAsk a question
 

AnswerSSRS - facing issue while passing an INT parameter value to SYBASE SP

  • Monday, August 24, 2009 11:20 AMibharat84 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am facing following issue while passing an INT parameter value to SYBASE SP.

     

    Error [42000][Sybase][ODBC Driver][Adaptive Server Enterprise]Implicit conversion from data type ‘CHAR’ to ’INT’ is not allowed.

    Use CONVERT function to run query.

     

    Input parameter is defined as int only.

    I am not able to pass float (Decimal) values also.

     

    Can you please help me to resolve this issue?

    I have tried expliceitly converting in the query also, but nothing seems to work.

Answers

  • Thursday, August 27, 2009 8:57 AMibharat84 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Solved the issue. since we were facing this issue when calling the Sybase SP from SSRS 2005, we tricked the exec SP to include convert code.
    So dataset creation goes something like this:

    declare @a int
    Set @a = (select convert(int,?))
    exec SP @a
    • Marked As Answer byibharat84 Thursday, August 27, 2009 8:57 AM
    •  

All Replies

  • Thursday, August 27, 2009 8:57 AMibharat84 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Solved the issue. since we were facing this issue when calling the Sybase SP from SSRS 2005, we tricked the exec SP to include convert code.
    So dataset creation goes something like this:

    declare @a int
    Set @a = (select convert(int,?))
    exec SP @a
    • Marked As Answer byibharat84 Thursday, August 27, 2009 8:57 AM
    •