Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> filter a TypedView in-memory
 

Pages: 1
LLBLGen Pro Runtime Framework
filter a TypedView in-memory
Page:1/1 

  Print all messages in this thread  
Poster Message
mkamoski
User



Location:
ZULU-5
Joined on:
06-Dec-2005 22:51:12
Posted:
116 posts
# Posted on: 05-Sep-2006 16:43:56.  
All --

Please help.

Is it possible to filter a TypedView in-memory?

I want to do something like this pseudo-code...

Code:

myPredExpression = 'build PredicateExpression

myFilterBucket = 'build RelationPredicateBucket with myPredExpression

Dim myITypedView As ORMSupportClasses.ITypedView2 = EntityAdapter.HelperFactory.GetTypedView(GetType(BusinessObjects.TypedViewClasses.SomeTypedView), myFilterBucket, allowDuplicates:=False)

'...blah, blah, blah...

myTypedView1 = DirectCast(myITypedView, BusinessObjects.TypedViewClasses.SomeTypedView)

'now I have ALL my data, hitting the database only 1x...

myTypedView2 = some portion of myTypedView1 fitered (where SomeKey=2)

myTypedView3 = some portion of myTypedView1 fitered (where SomeKey=3)

'...blah, blah, blah...

...and so on.

Bascially, I want to get all of my data from the database in one read and then filter out subsets of that data based on some key.

Is this possible?

If yes, then can you give a brief description of how to do it?

Please advise.

Thank you.

-- Mark Kamoski
http://www.WebLogicArts.com   Top
Jessynoo
Support Team



Location:
Lyon, France
Joined on:
19-Aug-2004 06:39:28
Posted:
296 posts
# Posted on: 05-Sep-2006 19:50:31.  
Hi,

a TypedView inherits from DataTable, so it has the same in memory capabilities.

You should be able to use yourDT.Select() a bit the same way that you'd use FindMatches() from a Collection, instead that it takes a string there.

Have a look at the datatable doc.

Also, it returns a DataRow array so you'll have to add them in your new Views.

Hope that helps


Jesse
LLBLGen Pro Support Team
 
Top
mkamoski
User



Location:
ZULU-5
Joined on:
06-Dec-2005 22:51:12
Posted:
116 posts
# Posted on: 07-Sep-2006 21:56:28.  
Jessynoo wrote:
Hi,

a TypedView inherits from DataTable, so it has the same in memory capabilities.

You should be able to use yourDT.Select() a bit the same way that you'd use FindMatches() from a Collection, instead that it takes a string there.

Have a look at the datatable doc.

Also, it returns a DataRow array so you'll have to add them in your new Views.

Hope that helps


Yes, that helps a lot.

(I simply forgot that the TypedView IS a DataTable.)

Thank you.

-- Mark Kamoski

http://www.WebLogicArts.com   Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.