Menu

Table changes not captured on refresh

0 votes

(Running dbFront Version:1.0.8.2641)

It'd be great if the refresh from DB process removed deleted/renamed columns from search and sort field lists.

Steps to reproduce
-- öööööööööööööööööööööööööööööööööööööö
CREATE TABLE dbo.test
(TestId INT IDENTITY(1,1) PRIMARY KEY NONCLUSTERED
,TestColumnToKeep INT
,TestColumnToRemove INT
)
GO

INSERT INTO dbo.test (TestColumnToKeep,TestColumnToRemove)
VALUES(1,2),(2,3)
GO

-- öööööööööööööööööööööööööööööööööööööö
Refresh dbFront, add the table, configure form by including TestColumnToRemove in search and sort

-- öööööööööööööööööööööööööööööööööööööö
Return to sql & exec the statement:

ALTER TABLE dbo.test DROP COLUMN TestColumnToRemove
GO

-- öööööööööööööööööööööööööööööööööööööö
-- refresh dbFront
Go to Main --> Test
Get error
"Data Error: Can't get data, Windowed functions and NEXT VALUE FOR functions do not support constants as ORDER BY clause expressions."

TestColumnToRemove remains in the "Selected" table fields with (deleted) and remains in the sort box. I assume this is the error cause.

Moving it from "Selected" to "Options" and clicking save gives error:
The value [TestColumnToRemove] is not a valid [Search Field]

Removing from the search fields allows save.
Now if you click the gear icon to configure the table the column TestColumnToRemove is gone.

in Version 1.0 or older by (770 points)

1 Answer

+1 vote

Thanks for the detailed error report.

Note: I intentionally leave the missing columns in the configuration to deal with the situation where columns are temporarily removed or renamed. dbFront will only force you to remove the columns when you attempt to edit the table preferences.

At the same time dbFront obviously did not handle the missing column gracefully. I will look into that.

by (64.3k points)
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...