Oracle Error Invalid character

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am setting the command object text of an OracleCommand to "Select
FNGETDBVER() FROM DUAL;"

I am attempting to retrieve the result of this function. However, when I
call ExecuteScalar on this I get an invalid character error: "ORA-00911:
invalid character".

Any ideas? I can execute this sql fine from any oracle client tool.

Thanks
 
Oldman said:
I am setting the command object text of an OracleCommand to "Select
FNGETDBVER() FROM DUAL;"

I am attempting to retrieve the result of this function. However, when I
call ExecuteScalar on this I get an invalid character error: "ORA-00911:
invalid character".

Any ideas? I can execute this sql fine from any oracle client tool.

Just like the error says. ';' is an invalid character in Oracle SQL. Other
client tools will strip it off.

David
 
Thanks. That was it. One thing I hate about Oracle is the fact that their
PL-SQL language is an extension and doesn't work hand and hand with their SQL
implementation. If this select statement was within a PL-SQL block it would
have required the semi-colon.

I was originally thinking that it didn't like the ( or ) in the select
statement.

Anyway, thanks again.
 
Back
Top