Strange error with different SQL Server versions

  • Thread starter Thread starter paulo
  • Start date Start date
P

paulo

Hello,

We're having a really strange problem with an application we're
developing. All development was done with SQL Server 2000, so the
application should be compatible with both SQL Server 2000 and SQL
Server 2005. However, when connected to the same database updated to SQL
Server 2005, we're getting some errors here and there. One of the most
common is one field Varchar(12) where we usually store an integer value.
When doing Update with a TableAdapter involving this field, we get the
error:

System.Data.SqlClient.SqlException: Error converting data type nvarchar
to bigint.

whereas with SQL Server 2000, everything goes well.
Does anyone have any clue why this is happening?
Thanks in advance for any help given.

Regards,
paulo
 
SQL 2000 allowed for a lot more implicit conversions than SLQ 2005. YOu will
have to be explicit in your conversion from int to varchar(12).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
Sorry, but we've found the reason. There was a trigger on the table that
was declaring a variable in a way that apparently can be done on SQL
Server 2000 but not on SQL Server 2005.
Thanks.

Regards,
paulo
 
Back
Top