Generally the following code we use to write as inline query

OracleConnection conn = new OracleConnection(-myConnectionString-);
conn.Open();
OracleCommand command = new OracleCommand("select userid from usermaster;", conn);
var v = command.ExecuteReader();
OracleCommand command = new OracleCommand("select userid from \"usermaster\";", conn);
var v = command.ExecuteReader();




Same query would work in PL/SQL Developer or command prompt but won’t from your Code.

it’s because you have put semicolon (‘;’) at the end.

Remove the ; semicolon it would work.

One thought on “Resolved : ORA 00911 invalid character inline query C# or Java”
  1. Everything is very open with a precise description of the issues.

    It was definitely informative. Your website is extremely helpful.
    Many thanks for sharing!

Leave a Reply