This is a migrated thread and some comments may be shown as answers.

ObjectProvider, ObjectView, and Other

4 Answers 138 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Fakhru
Top achievements
Rank 2
Fakhru asked on 30 Aug 2009, 01:43 AM
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?

4 Answers, 1 is accepted

Sort by
0
Fakhru
Top achievements
Rank 2
answered on 30 Aug 2009, 08:43 AM
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?
0
Accepted
PetarP
Telerik team
answered on 31 Aug 2009, 09:33 AM
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.
0
Fakhru
Top achievements
Rank 2
answered on 31 Aug 2009, 05:08 PM
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
0
Jan Blessenohl
Telerik team
answered on 01 Sep 2009, 05:48 AM
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.
Tags
Getting Started
Asked by
Fakhru
Top achievements
Rank 2
Answers by
Fakhru
Top achievements
Rank 2
PetarP
Telerik team
Jan Blessenohl
Telerik team
Share this question
or