ORA-00933 OracleException

2 posts, 0 answers
  1. Marc
    Marc avatar
    1 posts
    Member since:
    Jul 2012

    Posted 03 Sep 2012 Link to this post

    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;
            }
  2. Ralph Waldenmaier
    Admin
    Ralph Waldenmaier avatar
    202 posts

    Posted 05 Sep 2012 Link to this post

    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!
  3. DevCraft banner
Back to Top