Sqlerror 5074 & 4922 altering table in NAV2009 client

livingdolllivingdoll Member Posts: 45
Hi,

I've converted a 4.0 database to be able to open it with NAV2009. That worked very well. I'm now trying to import a fob that alters the custom code field 'Shelf' in custom table 'ShelfLedger' (the datalength changes from 10 to 20). The field has the following tablerelation: 'Shelf.Code where (Location=FIELD(Location))'.

When I try to import the fob, SQL Server raises the following error messages:

5074,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]The Object 'DBNAME$ShelfLedger$VSIFT$38'is dependent on column 'Shelf'
4922,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE ALTER COLUMN Shelf failed because one or more objects access this column.

SQL: ALTER TABLE "dbo"."DBNAME$ShelfLedger" ALTER COLUMN "Shelf" VARCHAR(20) NOT NULL

Does anyone have a clue why this happens? And what could be the solution? I'm stuck. It doesn't seem to happen when I import it in a Nav4 client.

Another question: why does the sql query that Nav generates contain the 'NOT NULL' part? The field has value No for the property NotBlank...


I hope someone can shine a light on this

Best regards,

Greys

Answers

  • livingdolllivingdoll Member Posts: 45
    Found it. Well, I didn't find out the reason why but I found out how to modify the field without errors. I had to disable ALL the indexes in the table, save it, change the Datalength from 10 to 20, save it, enable all the indexes and save it again...

    Still,if anyone has a clue on the reason of the error message, I would he happy to hear it!


    Best regards,

    Greys
Sign In or Register to comment.