Search   

Sunday, February 05, 2012

Support » Support Forum

Register  Login

 Menu  
 
    

 Welcome!  
 


Welcome to the NDO support forum!

kreis.gif Please register/login at the site if you want to post a thread. We sometimes copy support mails of common interest to the forum. They appear with anonymous sender.
kreis.gif Please post your messages in English language if possible. You can do your posts also in German, we will translate your post and our answer so that all users of the forum can read your posts.
kreis.gif The forum software requires that javascript is enabled.
kreis.gif Please do not insert licence information or licence keys in forum posts.
kreis.gif If you know a good answer to a post of another user, feel free to reply!
kreis.gif The forum is monitored. We reserve the right to remove posts we consider not to be useful for other forum users.

   Print   

      
 NDO Support Forum  
 
SearchForum Home
  NDO-Forum postings in english please, if possible.  Developing with NDO  Generic Collect...
 Generic Collections
 
 6/8/2006 3:13:38 PM
stm
3 posts


Generic Collections
Is it possibe to store query results in typed collections? I'd like to do something like this:

Public Function GetAllGroups() As IList (Of CGroup)
  Dim pm As New PersistenceManager
  Dim qry As Query = pm.NewQuery(GetType(CGroup), Nothing)
  Dim lstGroups As IList(Of CGroup) = qry.Execute
  Return lstGroups
End Function

At runtime I get a type conversion error.
 6/8/2006 4:24:07 PM
Mirko
109 posts
5th


Re: Generic Collections

Hi stm,

use the generic class NDOQuery(of T):

Dim q As New NDOQuery(Of CGroup)(pm)
Dim lstGroups As List(Of CGroup) = q.Execute

If you have any further questions, I'm happy to give you an answer.

Regards:
Mirko

 6/8/2006 4:36:05 PM
stm
3 posts


Re: Generic Collections
Thanks for the quick answer. Where do I find this in the documentation? Do I use a wrong version?
 6/8/2006 4:45:23 PM
Mirko
109 posts
5th


Re: Generic Collections
The new generic features are described in the english documentation which you can download from here. The english documentation will replace the existing german documentation in the next NDO Service Release.
  NDO-Forum postings in english please, if possible.  Developing with NDO  Generic Collect...
  SearchSearch  Forum HomeForum Home