Entity Framework ExecuteStoreCommand gives {"ORA-00936: missing expression"}

James Shields

I'm trying to run the following in a VB.NET application using Entity Framework 6 on an Oracle database:

mrstage.ExecuteStoreCommand("DELETE FROM CB_LISTINGS WHERE ELIGIBLE={0}", eligible)

When it executes, I get the error: {"ORA-00936: missing expression"}

On my table, ELIGIBLE is of type VARCHAR2, and the eligible variable is a string.

If I hardcode the parameter, for example:

mrstage.ExecuteStoreCommand("DELETE FROM CB_LISTINGS WHERE ELIGIBLE='ECB'")

It works fine.

I'd be very grateful if someone can offer any suggestions.

Thanks!

James

DavidG

In Oracle parameters are named differently, use a column parameter like :0 instead of {0}.

So your code is now:

mrstage.ExecuteStoreCommand(
    "DELETE FROM CB_LISTINGS WHERE ELIGIBLE=:0",
    eligible)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ORA 00936 Missing Expression

From Dev

ora:00936 Missing Expression error

From Dev

ORA-00936: missing expression distinct on oracle

From Dev

ORA-00936: missing expression - what is the cause?

From Dev

ORA-00936: missing expression oracle

From Dev

ORA-00936: missing expression in order by case

From Dev

SQL Error -- ORA-00936: missing expression

From Dev

ORA-00936: Missing Expression Teradata

From Dev

ORA-00936: missing expression error when inserting values

From Dev

ORA-00936: missing expression, although there seems to be no missing expression (SQL)

From Dev

ORA-00936: missing expression bad SQL grammar

From Dev

ORA-00936: missing expression while executing in C#.

From Dev

ORA-00936: missing expression, although there seems to be no missing expression (SQL)

From Dev

ORA-00936: missing expression ORACLE please help me

From Dev

Oracle data access error: ORA-00936: missing expression

From Dev

ORA-00936: missing expression while using stringbuilder

From Dev

HQL with one-to-many relationship is giving "ORA-00936: missing expression" exception

From Dev

getting java.sql.SQLSyntaxErrorException: ORA-00936: missing expression error

From Dev

HQL with one-to-many relationship is giving "ORA-00936: missing expression" exception

From Dev

Sql throws 'DBError: ORA-00936: missing expression' when empty expression_list is passed

From Dev

Entity Framework - CreateQuery VS ExecuteFunction VS ExecuteStoreQuery VS ExecuteStoreCommand

From Dev

ORA-06550: line 12, column 9: PL/SQL: ORA-00936: missing expression ORA-06550: line 9, column 5: PL/SQL: SQL Statement ignored

From Dev

Using Entity Framework in EC2 gives EntityException

From Dev

Entity Framework - simple operation gives Format exception - Index (zero based) must be greater than or equal to zero

From Dev

Lazy and Eager Loading in Entity Framework gives same result while using .Include() in both?

From Dev

Entity framework 6 many to many code first eager loading gives recursive result

From Dev

Entity Framework - simple operation gives Format exception - Index (zero based) must be greater than or equal to zero

From Dev

"Not In" in Entity Framework

From Dev

DI with Entity Framework Entity

Related Related

  1. 1

    ORA 00936 Missing Expression

  2. 2

    ora:00936 Missing Expression error

  3. 3

    ORA-00936: missing expression distinct on oracle

  4. 4

    ORA-00936: missing expression - what is the cause?

  5. 5

    ORA-00936: missing expression oracle

  6. 6

    ORA-00936: missing expression in order by case

  7. 7

    SQL Error -- ORA-00936: missing expression

  8. 8

    ORA-00936: Missing Expression Teradata

  9. 9

    ORA-00936: missing expression error when inserting values

  10. 10

    ORA-00936: missing expression, although there seems to be no missing expression (SQL)

  11. 11

    ORA-00936: missing expression bad SQL grammar

  12. 12

    ORA-00936: missing expression while executing in C#.

  13. 13

    ORA-00936: missing expression, although there seems to be no missing expression (SQL)

  14. 14

    ORA-00936: missing expression ORACLE please help me

  15. 15

    Oracle data access error: ORA-00936: missing expression

  16. 16

    ORA-00936: missing expression while using stringbuilder

  17. 17

    HQL with one-to-many relationship is giving "ORA-00936: missing expression" exception

  18. 18

    getting java.sql.SQLSyntaxErrorException: ORA-00936: missing expression error

  19. 19

    HQL with one-to-many relationship is giving "ORA-00936: missing expression" exception

  20. 20

    Sql throws 'DBError: ORA-00936: missing expression' when empty expression_list is passed

  21. 21

    Entity Framework - CreateQuery VS ExecuteFunction VS ExecuteStoreQuery VS ExecuteStoreCommand

  22. 22

    ORA-06550: line 12, column 9: PL/SQL: ORA-00936: missing expression ORA-06550: line 9, column 5: PL/SQL: SQL Statement ignored

  23. 23

    Using Entity Framework in EC2 gives EntityException

  24. 24

    Entity Framework - simple operation gives Format exception - Index (zero based) must be greater than or equal to zero

  25. 25

    Lazy and Eager Loading in Entity Framework gives same result while using .Include() in both?

  26. 26

    Entity framework 6 many to many code first eager loading gives recursive result

  27. 27

    Entity Framework - simple operation gives Format exception - Index (zero based) must be greater than or equal to zero

  28. 28

    "Not In" in Entity Framework

  29. 29

    DI with Entity Framework Entity

HotTag

Archive