ObjectProvider, ObjectView, and Other

5 posts, 1 answers
  1. Fakhru
    Fakhru avatar
    37 posts
    Member since:
    Oct 2007

    Posted 29 Aug 2009 Link to this post

    I have question:
    1. Is ObjectProvider and ObjectView component available only in .NET 3.5 project only?
    2. I have added ObjectProvider in my Form, and set the QueryCondition to : SELECT * FROM BookExtent b WHERE EXISTS s IN b.stocks : (s.storage=$1)
      How/when to set $1 parameter value in code?
    3. I have persistent fields with nvarchar (2000), I'm using SQLSERVER EXPRESS 2005 as a backend, but when I try to save text in 1000+ char from textarea (bellow 2000 char), it's get truncate. I'm using it in my MVC apps, is this textarea length limitation, MVC, or OpenAccess  BUGS?

  2. Fakhru
    Fakhru avatar
    37 posts
    Member since:
    Oct 2007

    Posted 30 Aug 2009 Link to this post

    More question.
    I have persistent(s) class something like this:

    [Persistent]
    public class Book
    {
        string title;
        IList<Stock> stocks;
    }

    [Persistent]
    public class Storage
    {
        string name;
    }

    [Persistent]
    public class Stock
    {
        decimal qty;
        Storage storage;
    }


    Every book have 1:n Stock.

    Sample data:
    1. Book: title=C++ In 24 Minutes
        stocks: #0: Storage.name=Default, qty=1
    2. Book: title=VB.NET for Dummies
        stocks: #0: Storage.name=Default, qty=5
            #1: Storage.name=Warehouse, qty=95

    If I want to show only book with storage.name=Default what is the most optimized OSQL?
    I'm using this OQL: SELECT * FROM BookExtent b WHERE EXISTS s IN b.stocks : (s.storage.name=$1)
    But every access of Book.stocks[0].qty OpenAccess send 1 SQL, If the Book data 1000, will result additional 1000 Sql Query?
  3. DevCraft banner
  4. Answer
    PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 31 Aug 2009 Link to this post

    Hello Fakhru,

    1. The ObjectProvider and ObjectView are available for both .Net3.5 and .Net2.0.
    2. Currently passing of parameters to the ObjectProvider is not possible.
    3. This is rather limitation of the text area. We tested your scenario and inserted a 1000+ string in our database. No truncation took place.
    You can apply some custom fetch plans to control the way your data is retrieved. This will greatly reduce the SQL statements being executed. I believe that you will find the the following topic useful. You can also have a look at our demo.

    All the best,
    Petar
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Fakhru
    Fakhru avatar
    37 posts
    Member since:
    Oct 2007

    Posted 31 Aug 2009 Link to this post

    1. The ObjectProvider and ObjectView are available for both .Net3.5 and .Net2.0.

    I don't see any ObjectProvider and ObjectView component in toolbox when developing with WinForm and .NET 2.0, it's show when I switched to .NET 3.5.


    Best Regards,
    Fakhru Rahman
  6. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 01 Sep 2009 Link to this post

    Hello Fakhru,
    That is a problem  with our api assembly, it links against 3.0 as well but is working fine with a .net 2.0 application. Nevertheless the designer thinks that it is a 3.0 minimal version assembly and it is not showing the toolbox entries. You can switch your project temporary to 3.0 and put everything on your pages, then switch back to 2.0, that will work. Another way is to show all entries in the toolbox, select the one you need, press copy on the keyboard, select the form and press paste.

    Kind regards,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner