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

open access data source where clause

1 Answer 89 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
bharat veer
Top achievements
Rank 1
bharat veer asked on 16 Jun 2011, 05:11 PM
i have open access data source control on my page.
with the help of this control i am binding drop down list.
oadsUnit is the object of open access data source.
rcbUnit   is the object of dropdownlist.
                oadsUnit.ObjectContextProvider = "project.Data.Orm.ProjectModel, project.Data.Orm";
                oadsUnit.TypeName = "project.Data.Orm.SystemList";
                oadsUnit.Where = "ListType = \"uofm\" ";
                oadsUnit.EnableDelete = false;
                oadsUnit.EnableInsert = false;
                oadsUnit.EnableUpdate = false;
                oadsUnit.StoreOriginalValuesInViewState = false;
                rcbUnit.DataSourceID = "oadsUnit";
                rcbUnit.DataValueField = "SystemListID";
                rcbUnit.DataTextField = "ListName";
                rcbUnit.DataBind();
                rcbUnit.Items.Insert(0, new RadComboBoxItem("Select Unit...", "0"));

i have a query in my sqlserver like this

select  *  from systemlist
where listtype='uofm' and systemlistid not in
(select unitlistid from itemunit where itemid=2014)


  oadsUnit.Where = "ListType = \"uofm\" ";
   in this where property how can above mentioned sql query can be given as a string.


             

1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 17 Jun 2011, 04:18 PM
Hello bharat veer,

You could find the following articles useful:
-    The IN Extent Clause;
-    The EXISTS Keyword;
They demonstrate how to use the EXISTS and IN clauses in OQL queries.
Hope that helps.

Regards,
Damyan Bogoev
the Telerik team
Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
Tags
Databases and Data Types
Asked by
bharat veer
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or