DBMS Functions and Pagination

6 posts, 0 answers
  1. Markus
    Markus avatar
    11 posts
    Member since:
    Jan 2009

    Posted 29 Apr 2009 Link to this post

    Hello,

    during the developement process of our windows forms application including your product Telerik ORM we have two issues:

    First issue: Use of DBMS functions with Telerik ORM. For dynamic created OQL Querys it seems that there is no workaround to use DBMS functions like to_upper or to_char. (Oracle Database)
    Second Issue: To display the data in a Grid we would like to use pagination. Does Telerik ORM supports in any way pagination or is there any best practice we can pre-filter the data for the grid?

    Thanks in advance
    Markus
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 30 Apr 2009 Link to this post

    Hi Markus,

    you are right, at the moment it is not possible to invoke dynamic functionality through OQL. String ToUpper/ToLower is however handled in our LINQ implementation.

    You can perform paging by using the the MaxResultCount and Skip properties on the IQuery interface.

    Sincerely yours,
    Thomas
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Garry Clark
    Garry Clark avatar
    55 posts
    Member since:
    Jan 2005

    Posted 18 May 2010 Link to this post

    Thomas,
    I know this is an old post, but I hate to clutter the boards with similar posts if one already exsists. Can you tell me if it is possible to call a Scalar-Valued function using OpenAccess. The database I am working on uses a function to return a PK that I need to filter on.

    I have read how to do this using LINQ, but I am not sure how this plays out using OpenAccess. Basically what I need to do is call this function from a LINQ query using OpenAccess.

     Function [dbo].[fnGetParticipantActiveCert] (@ParticipantPK int,  
                                                    @EffectiveDate datetime,  
                                                    @CutoffDate datetime  
                                                    )  
    RETURNS int 

    Here is my current LINQ query

    var result = (from c in scope.Extent<PtAMember>()  
                                 where (c.LastName.ToLower().Contains(param.ToLower()) || c.FirstName.ToLower().Contains(param.ToLower()) || c.SocialSecurityNumber.Contains(param))  
                                 //orderby c.FormattedName  
                                 select c).Distinct().OrderBy(PtAMember => PtAMember.LastName).ThenBy(PtAMember => PtAMember.FirstName); 

    and what I need to do is something similar to this.
    var result = (from c in scope.Extent<PtAMember>()  
                                 where (c.LastName.ToLower().Contains(param.ToLower()) || c.FirstName.ToLower().Contains(param.ToLower()) || c.SocialSecurityNumber.Contains(param)) && c.PtApprovedCertification.Pk = [fnGetParticipantActiveCert]  
                                 //orderby c.FormattedName  
                                 select c).Distinct().OrderBy(PtAMember => PtAMember.LastName).ThenBy(PtAMember => PtAMember.FirstName); 

    Any help would greatly be appreciated.

     

    Thanks!

  5. Ady
    Admin
    Ady avatar
    589 posts

    Posted 21 May 2010 Link to this post

    Hello Garry Clark,

     It is currently not possible to call a function via a LINQ query although we do have this on our plans.
    We will keep you updated  on this issue.

    Regards,
    Ady
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 23 Sep 2010 Link to this post

    Hello!

    Do you now something new about using DBMS functions with ORM? Is there already some progress?

    Thanks for helping.
  7. Ady
    Admin
    Ady avatar
    589 posts

    Posted 28 Sep 2010 Link to this post

    Hello Richard Koslik,

      I'm afraid we still haven't made any progress on this topic - executing DBMS functions via OpenAccess, although, as you might already know, executing stored procedures is possible.

    Greetings,
    Ady
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner