Oracle Error Invalid character


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
 
Ad

Advertisements

D

David Browne

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
 
Ad

Advertisements

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top