alter column error when type is longvarbinary

2005-04-21
2014-01-19
  • Thomas Hertz

    Thomas Hertz - 2005-04-21

    hi,

    i get an 'type conversion not allowed' error if I'm trying to change a longvarbinary column to the same datatype. we have an automatic process and sometime this lead to statements like

    ALTER table x ALTER COLUMN y LONGVARBINARY

    where the type of x.y was LONGVARBINARY.

    this works for all other types I've tested (VARCHAR e.g), and in my opinion should also work for longvarbinary fields.

    bug?

    the following testscript fails in the 4th line:

    CREATE TABLE testtable (test1 varchar, test2 longvarbinary)
    INSERT INTO testtable (test1,test2) VALUES ('test', null )
    ALTER TABLE testtable ALTER COLUMN test1 varchar
    ALTER TABLE testtable ALTER COLUMN test2 longvarbinary

    greetings from munich, .thomas

     
    • Fred Toussi

      Fred Toussi - 2005-04-21

      We can add the following check in TableWorks.reTypeColumn()

              if ( newtype == oldtype){
                  return;
              }

      BTW, RC10 code will be in CVS by tomorrow, with this fix.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks