Sunday, February 11, 2007

"Cannot call methods on bigint" error

I had a view in my database (MS SQL 2005) with "Cast" statements.

At one point I tried modifying it, but this resulted in the following error:

"Cannot call methods on bigint"

After doing some research it turns out there was no problem with my query - the error came from the SQL 2005 management studio itself.

The fix was using T-SQL to modify the view instead of using the designer....

3 comments:

D.M. said...

This post saved me a lot of time. Thanks.

Anonymous said...

perfect

Anonymous said...

Thanks, this is still helpful over 3 years later in SQL Server 2008...

Just to be clear to others: The easy way to get around this is to create the view without the cast/convert statements, then script as "drop and create", add in the methods causing the errors, and voila, it works.