How to user ExecuteSingleRowRetrievalQuery,can some one give me an example?

Posts   
 
    
xc_lw2000
User
Posts: 48
Joined: 12-Dec-2006
# Posted on: 17-Dec-2008 12:59:32   
ExecuteSingleRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFields2 fieldsToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo);
ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, bool allowDuplicates, IEntityFields2 fieldsUsedForQuery);

How to use these two methods?What's IFieldPersistenceInfo means?How to create it?

Please give me some examples?

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 17-Dec-2008 14:42:13   

Why do you want to call any of these 2 methods?

Max avatar
Max
User
Posts: 221
Joined: 14-Jul-2006
# Posted on: 17-Dec-2008 17:34:07   

xc_lw2000 wrote:

What's IFieldPersistenceInfo means?How to create it?

You can get the FieldPErsistenceInfo object from the class

PersistenceInfoProviderSingleton.GetInstance

defined in your DbSpecific Project. This is a firend class, so you need to expose it in some way if you want to use it outside the DBbSpecific project.

I've used the FieldPersistenceInfo for a procedure that check the structure of the DB respect to the structure of the running DAL DLL. It only check tables name, fields name, and relations; but it's better than nothing, and it's enough to stop the application from starting if the DB is not up to date simple_smile