SQL 2005 Data Type Error Message

  • I recently moved a SQL 2000 database to SQL 2005 installed on a different server. We have an application developed using .NET that takes data from this SQL 2000 database. When the information is sent from one of the forms to the database through the stored procedure, I am getting the error message below.

    ‘Database Exception: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 8 (“@adjCost”): The supplied value is not a valid instance of data type numeric. Check the source data for invalid values. An example of invalid value is data of numeric type with scale greater than precision. '

    When I checked the data type for the stored procedure and the columns in the table, they all are set to Decimal(18,2) and the data that is coming from the .NET form is not very big.

    Can someone please help me on how to fix this error message? The software was developed by a Consulting company and I don't have access to the .NET code.

    Thanks,

    Uma

  • The error is related to compatibility mode 80 of your upgraded database your developer may have used .NET 2.0 decimal which may not map to SQL Server 2000 decimal. A quick fix is to go to the database properties and options to change it to 90 so the error will go away without code changes. Check below for details.

    http://msdn.microsoft.com/en-us/library/ms131092(SQL.90).aspx

    Kind regards,
    Gift Peddie

  • Hi Uma

    Seems to be an issue within SQL Server 2005 which should be fixed with service pack. See the following link:

    http://bug.gd/search/details/90710/the-incoming-tabular-data-stream-tds-protocol-stream-is-incorrect-the-stream-ended-unexpectedly

    Which refers to:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;959025&sd=rss&spid=2855

    Good luck

    Flo

  • Thank you Gift and Florian for your immediate replies.

    I changed the database properties to 90 but I am still getting the same error message.

    I will try applying the service pack 3 and see if it resolves the error.

    Thanks again.

    Kind regards,

    Uma

  • If SP3 does not fix it then your only other option is to adjust the Numeric data type precision and scale.

    http://msdn.microsoft.com/en-us/library/ms187746(SQL.90).aspx

    Kind regards,
    Gift Peddie

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

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