0

When updating a column on my table from varchar(6) to varchar(10) using Database Telerik, SQL Server throws this error:

SQL exception on 'ALTER TABLE [Bin] ALTER COLUMN [bin_code] varchar(10) NOT NULL' : Cannot create a row of size 8061 which is greater than the allowable maximum row size of 8060.

The problem is, the table usually has 30 bytes of length, since it's composed by one varchar column and some int and foreign Keys.

CREATE TABLE [dbo].[Bin]
(
    [id] [int] IDENTITY(1,1) NOT NULL,
    [bin_code] [varchar](6) NOT NULL,
    [icc_modulus_size] [int] NOT NULL,
    [icc_public_exponent] [int] NOT NULL,
    [icc_generation_counter] [int] NOT NULL,
    [id_brand] [int] NOT NULL,
    [id_issuer] [int] NOT NULL,

)

(not included the foreign key part)

I know that a row in SQL can't exceed the length of 8060, but the problem is why it's trying to create this when updating the table?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Lucas Real
  • 83
  • 6

0 Answers0