Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    13

    Unanswered: Datatype Conversion Problem.

    Hi ALL!

    I have a table named 'Table1' which contains a column 'Name'.
    The data type of column [Name] is varchar(50).

    When i try to change its datatype to binary by trying following code

    ALTER TABLE Table1 Alter Column [Name] Binary(5000)

    It gives following error.

    " Creation of table 'bp_MAIN' failed because the row size would be 10021, including internal overhead. This exceeds the maximum allowable table row size, 8060. "

    So, how can i change the datatype of this column ?

    Regards,
    Shabber Abbas.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Not meaning to be thick here, but why are you changing a varchar to a binary? Did you want instead to change it to nvarchar?

    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    Jan 2006
    Posts
    27
    In this case, you are implying that you want to convert varchar data to binary. I don't think that can be done automatically. The error might be misleading.

    If that's the only field, it shouldn't give that error, but a table consisiting of only a binary field seems like it's not very useful. Is a blob out of the question? it only takes up 16bytes of the page. Yould definetely need to export/import then.

    You should be able to add a binary column, or export the data, recreate the table with a binary field, and then import the data, with suitable massaging.

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    You could use varbinary, but if the amount of data in the row exceeds 8060, you will get errors, instead of warnings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •