Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Page based on a SQL View crashes after user customizes columns (changes sequence)

$
0
0
Hi,

I have a table defined from a SQL View (LinkedTable). I have a page that displays the view. The repeater area is non-editable and the page properties have InsertAllowed=No,ModifyAllowed=No and DeleteAllowed=No.

A user tried to customize the page and relocate one of the columns, moving it "up" in the list. After that, this page has been corrupted for all users. Here is the message that is displayed any time any user tries to run the page:

The following SQL error was unexpected:
View or function 'TESTCompany$v_InventoryByLocation View' is not updatable because the modification affects multiple base tables.
Statement(s) could not be prepared.

I checked the Windows event log and it had some information that doesn't make sense:

View or function 'TEST2016.TESTCompany$v_InventoryByLocation View' is not updatable because the modification affects multiple base tables.
Statement(s) could not be prepared.
SQL statement:
INSERT INTO "TEST2016".dbo."TESTCompany$v_InventoryByLocation View" ("Entry No_","weEntryNo","Item No_","Variant Code","Description","Location Code","Lot No_","Serial No_","In Quarantine","Donor Type","Donor No_","Donation Date","Vial Status","Quantity","Release No_","Released Date","Open","Storage Contract No_","Bin Code","Bin Description","Bin Description (Short)","Egg Quantity","Product Code") VALUES (@0,@1,@2,@3,@4,@5,@6,@7,@8,@9,@10,@11,@12,@13,@14,@15,@16,@17,@18,@19,@20,@21,@DBTS

@DBTS field is the Timestamp field that gets added by NAV to all tables. But if that's what's happening, this "temporary" area isn't the view itself.

We have the same page in NAV2009. I get a similar error:


The following SQL Server error or errors occurred when accessing the v_InventoryByLocation View table: 4405,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]View or function 'Development2.dbo.TESTCompany$v_InventoryByLocation View' is not updatable because the modification affects multiple base tables.
8180,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.

SQL:
INSERT INTO "Development2"."dbo"."TESTCompany$v_InventoryByLocation View" WITH (REPEATABLEREAD, ROWLOCK) ("Entry No_","weEntryNo","Item No_","Variant Code","Description","Location Code","Lot No_","Serial No_","In Quarantine","Donor Type","Donor No_","Donation Date","Vial Status","Quantity","Release No_","Released Date","Open","Storage Contract No_","Bin Code","Bin Description","Bin Description (Short)") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

Does anyone know if this is a known issue - that you cannot customize a page based on a LinkedView table?

Ron

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>