TypedListDAO class in adaptor

Posts   
 
    
kakaiya
User
Posts: 182
Joined: 20-Mar-2004
# Posted on: 08-Nov-2005 00:57:28   

Where can we find TypedListDAO generated class in Adaptor model?

I need a working proper example of Dynamic typed list.

Regards

Kaksss

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 08-Nov-2005 10:06:02   

Please check the Dynamic list documentation in the adapter section: using the generated code / adapter / Using views and lists / Using dynamic lists.

Frans Bouma | Lead developer LLBLGen Pro
kakaiya
User
Posts: 182
Joined: 20-Mar-2004
# Posted on: 09-Nov-2005 01:16:12   

Hi

In the help documentation topic Generated code - Using dynamic lists, Adapter below example code is given.

' VB.NET
Dim adapter As New DataAccessAdapter()
Dim fields As New ResultsetFields(3)
fields.DefineField(EmployeeFieldIndex.FirstName, 0, "FirstNameManager", "Manager")
fields.DefineField(EmployeeFieldIndex.LastName, 1, "LastNameManager", "Manager")
fields.DefineField(EmployeeFieldIndex.LastName, 2, "AmountEmployees", "Employee", AggregateFunction.Count)
Dim bucket As IRelationPredicateBucket = New RelationPredicateBucket()
bucket.Relations.Add(EmployeeEntity.Relations.EmployeeEntityUsingEmployeeId, "Employee", "Manager", JoinHint.None)

Dim groupByClause As IGroupByCollection = New GroupByCollection()
groupByClause.Add(fields(0))
groupByClause.Add(fields(1))

Dim dynamicList As New DataTable()
Dim dao As New TypedListDAO()
adapter.FetchTypedList(fields, dynamicList, bucket, 0, Nothing, True, groupByClause)

Is line Dim dao As New TypedListDAO() need to be there or is it a extra line doing nothing?

Regards

Kaksss

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 09-Nov-2005 10:09:46   

Not needed, it's a glitch in the documentation, sorry for that. I'll correct the documentation, thanks for reporting simple_smile

Frans Bouma | Lead developer LLBLGen Pro
arobadol
User
Posts: 17
Joined: 04-Jan-2007
# Posted on: 04-Jan-2007 12:08:01   

the question as not been answered... simple_smile

Where to find the TypedListDAO when using the Adaptor templates.

Here is the code provided in the documentation. I'm trying to do the samething but TypedListDAO is sort of well hidded somewhere...

TypedListDAO dao = new TypedListDAO(); IDataReader reader = dao.GetAsDataReader(null, RetrievalProcedures.GetCustOrdersOrdersCallAsQuery( "CHOPS" ), CommandBehavior.CloseConnection ); while( reader.Read() ) { Console.WriteLine( "Row: {0} | {1} | {2} | {3} |", reader.GetValue( 0 ), reader.GetValue( 1 ), reader.GetValue( 2 ), reader.GetValue( 3 ) ); } reader.Close();

thanks for the help

arobadol

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 04-Jan-2007 12:42:54   

arobadol wrote:

the question as not been answered... simple_smile

which question? You post in a thread from someone else.

Where to find the TypedListDAO when using the Adaptor templates.

Here is the code provided in the documentation. I'm trying to do the samething but TypedListDAO is sort of well hidded somewhere...

TypedListDAO dao = new TypedListDAO(); IDataReader reader = dao.GetAsDataReader(null, RetrievalProcedures.GetCustOrdersOrdersCallAsQuery( "CHOPS" ), CommandBehavior.CloseConnection ); while( reader.Read() ) { Console.WriteLine( "Row: {0} | {1} | {2} | {3} |", reader.GetValue( 0 ), reader.GetValue( 1 ), reader.GetValue( 2 ), reader.GetValue( 3 ) ); } reader.Close();

thanks for the help arobadol

TypedListDAO is for selfservicing, adapter has the methods on the DataAccessAdapter class. Please see the adapter specific section of the manual.

Frans Bouma | Lead developer LLBLGen Pro