|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Oracle Error Invalid characterI 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 Try removing the semi-colon.
Show quote "Oldman" <Old***@discussions.microsoft.com> wrote in message news:7DF681BA-58ED-4E62-BEF0-D3EBA64ED0D4@microsoft.com... >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 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. Show quote "Glenn" wrote: > Try removing the semi-colon. > > "Oldman" <Old***@discussions.microsoft.com> wrote in message > news:7DF681BA-58ED-4E62-BEF0-D3EBA64ED0D4@microsoft.com... > >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" <Old***@discussions.microsoft.com> wrote in message Just like the error says. ';' is an invalid character in Oracle SQL. Other news:7DF681BA-58ED-4E62-BEF0-D3EBA64ED0D4@microsoft.com... >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. > client tools will strip it off. David |
|||||||||||||||||||||||