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

ORA-00933 OracleException

1 Answer 45 Views
OQL (OQL specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marc
Top achievements
Rank 1
Marc asked on 03 Sep 2012, 04:18 PM
I write a simple query to test oql using the following statement:

"in the server side"
using (SimbadEntitiesModel sem = new SimbadEntitiesModel())
            {
                string queryString = "select m.NOM from IM_MALAD as m where m.NOM = 'BERNIER' and m.SEXE = 'M'";
                IEnumerable<IM_MALAD> malads = sem.ExecuteQuery<IM_MALAD>(queryString);
                return malads;
            }
I get always ORA-00933 OracleException.

"in the client side"

public MainPage()
        {
            InitializeComponent();
            EntityQuery<IM_MALAD> query = ctx.GetPatientByNameAndSexQuery();
            LoadOperation<IM_MALAD> lo = ctx.Load<IM_MALAD>(query);
            dgSearchResults.ItemsSource = lo.Entities;
        }

1 Answer, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 05 Sep 2012, 08:30 AM
Hi Marc,

The ExecuteQuery method is executing a sql statement and not an oql statement. The sql syntax you provided is not correct for oracle databases, since the 'as' keyword is not supported.
Please try the following statement instead.

string queryString = "select m.NOM from IM_MALAD m where m.NOM = 'BERNIER' and m.SEXE = 'M'";

I hope this information is helpful for you.
Feel free to ask if you have any other question.Greetings,
Ralph
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Tags
OQL (OQL specific questions)
Asked by
Marc
Top achievements
Rank 1
Answers by
Ralph Waldenmaier
Telerik team
Share this question
or