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

Ashok

I am writing a function for inserting BLOB file in to ORACLE. While executing the code I am getting the error stating that ORA-00936: missing expression.

My Code:

public static void DatabaseFilePut(MemoryStream fileToPut, OracleConnection con)
    {
     try
      {
       byte[] file = fileToPut.ToArray();
       const string preparedCommand = @"INSERT INTO user_account_statement (statement_id,session_key,login_id,user_id,account_number,
       from_date,todate,ipaddress,
       create_date_time,STATEMENT_FILE) VALUES(1073,'fe79e0345986b5a439c26f731234868b53f877366f529',
       2335,'204254','108142',to_date('2014-08-23 16:45:06','yyyy-mm-dd hh24:mi:ss'),
       to_date('2014-08-23 16:45:06','yyyy-mm-dd hh24:mi:ss'),
       '106.79.126.249',to_date('2014-08-23 16:45:06','yyyy-mm-dd hh24:mi:ss'),file)";
       using (var sqlWrite = new OracleCommand(preparedCommand, con))
       {
        sqlWrite.ExecuteReader();
       }
      }
      catch (Exception ex)
       {
         MessageBox.Show(ex.ToString());
       }
    }

Please advise where I am going wrong.

Ashok

I specified parameter for 'file'

sqlWrite.BindByName = true;
                var blobparameter = new OracleParameter
                {
                    OracleDbType = OracleDbType.Blob,
                    ParameterName = "ssfile",
                    Value = fileToPut.ToArray()
                };
                sqlWrite.Parameters.Add(blobparameter);

and changed parameter name too. because the parameter name file is ORACLE's reserved word. So it might create another problems.

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 while using stringbuilder

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, although there seems to be no missing expression (SQL)

From Dev

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

From Dev

ORA-00936: missing expression error when inserting values

From Dev

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

From Dev

ORA-00936: missing expression bad SQL grammar

From Dev

ORA-00936: missing expression ORACLE please help me

From Dev

Oracle data access error: ORA-00936: missing expression

From Dev

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

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

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

ORA-00923 Error while executing the query

From Dev

Geeting error ORA-01036 while executing Oracle Procedure using C#

From Dev

ORA-00936, Java and SQL

From Dev

Error while executing JavaScript computed expression

From Dev

Expression must have pointer to object type ERROR while executing C Program in Visual Studio

From Dev

Why am I getting the error "Expression Syntax" while executing the following C code:

From Dev

ORA-00911: invalid character error while executing a query

From Dev

Oracle SQL - ORA-00936 on DATE()

Related Related

  1. 1

    ORA 00936 Missing Expression

  2. 2

    ORA-00936: missing expression while using stringbuilder

  3. 3

    ora:00936 Missing Expression error

  4. 4

    ORA-00936: missing expression distinct on oracle

  5. 5

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

  6. 6

    ORA-00936: missing expression oracle

  7. 7

    ORA-00936: missing expression in order by case

  8. 8

    SQL Error -- ORA-00936: missing expression

  9. 9

    ORA-00936: Missing Expression Teradata

  10. 10

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

  11. 11

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

  12. 12

    ORA-00936: missing expression error when inserting values

  13. 13

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

  14. 14

    ORA-00936: missing expression bad SQL grammar

  15. 15

    ORA-00936: missing expression ORACLE please help me

  16. 16

    Oracle data access error: ORA-00936: missing expression

  17. 17

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

  18. 18

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

  19. 19

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

  20. 20

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

  21. 21

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

  22. 22

    ORA-00923 Error while executing the query

  23. 23

    Geeting error ORA-01036 while executing Oracle Procedure using C#

  24. 24

    ORA-00936, Java and SQL

  25. 25

    Error while executing JavaScript computed expression

  26. 26

    Expression must have pointer to object type ERROR while executing C Program in Visual Studio

  27. 27

    Why am I getting the error "Expression Syntax" while executing the following C code:

  28. 28

    ORA-00911: invalid character error while executing a query

  29. 29

    Oracle SQL - ORA-00936 on DATE()

HotTag

Archive