Skip to main content
Solved

Why can I select a view in data sets as table?


Forum|alt.badge.img+15

I've noticed there are updates regarding the unit testing part, especially for triggers bound to tables. But I've noticed that I can select views in the data sets > Data rows, so I tried :-).

Unfortunately that doesn't work, and maybe that is OK.

Question: Should views be selectable over here? If yes, then how to fix the following error:

The unit test was aborted while this was not expected.

Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1. ERROR [42000] Microsoft[SQL Server]Cannot alter 'dummy_view' because it is not a table. ERROR [42000] Microsoft[SQL Server]Statement(s) could not be prepared.

Hint: Debugger shows this:

alter table [dummy_view] disable trigger all;

Dummy_view isn't a table.

If not, then they should be removed from the drop down. I’d almost assume that the data set should be created using tables only, but when it's also possible to do this by views (we have a lot in stead of insert/update/deletes for views), it could be nice (not saying it is the proper way to do this).

Best answer by Serhat Sahin

Hi René,

First of all, it's great that you're using unit tests!

You're correct to point out that views shouldn't belong in data sets. The data used by the views should be stored in the underlying tables. Therefore, the views should be excluded from the table selection for data sets.

Thanks for reporting this bug, we will fix this as soon as possible!

 

With kind regards,

Serhat Sahin

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

Serhat Sahin
Apprentice
Forum|alt.badge.img+1
  • Apprentice
  • 7 replies
  • Answer
  • March 9, 2020

Hi René,

First of all, it's great that you're using unit tests!

You're correct to point out that views shouldn't belong in data sets. The data used by the views should be stored in the underlying tables. Therefore, the views should be excluded from the table selection for data sets.

Thanks for reporting this bug, we will fix this as soon as possible!

 

With kind regards,

Serhat Sahin


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9

Views are now excluded from table selection for data sets in the 2020.2 version of the Software Factory.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings