TypedView not as documentation

Posts   
 
    
gregkuha60
User
Posts: 47
Joined: 23-Jan-2012
# Posted on: 29-Mar-2019 10:08:45   

Hello

For sure i must have done a misstake or something but can't figuring out what. I have a DataBaseView in the database (MS SQL Server). I have done a "Reverse-engineer to a typedView". Under TypedViews i can see my TypedView in the llblgen-project However trying to use it i a bit confusing.

The documentation says like this:


InvoicesTypedView invoices = new InvoicesTypedView();
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
    adapter.FetchTypedView(invoices);
}

When looking in the GeneratedCode under TypedViewClasses i only have the "InvoicesTypedViewRow" there is no "InvoicesTypedView-class".

I'm using 5.5 (5.5.2) RTM

Any suggestion. Thanks Greg

gregkuha60
User
Posts: 47
Joined: 23-Jan-2012
# Posted on: 29-Mar-2019 10:55:30   

i solved my problem doing like this


var qf = new QueryFactory();
                var q = qf. InvoicesTypedView;
                var results = adapter.FetchQuery< InvoicesTypedViewRow>(q);

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 29-Mar-2019 18:30:09   

Edit the TypedView in the Designer, go to the "Code generation info" tab. Make sure the output type is "TypedDataTable".

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 29-Mar-2019 22:12:19   

The way you had it (so not as datatable) is recommended btw, so if you're happy with the poco, keep that wink If you want to have it as a datatable based typed view, use that. Fetching a typedview based on datatable is slower though.

Frans Bouma | Lead developer LLBLGen Pro