Windows Oracle Data Access Components (MOSC)

MOSC Banner

ORA-00900 on embedded single quotes in /* */ comments, sometimes

Connecting to any 19c database (19.17 and later) using version (4.122.19.1:20021007) of the Oracle.ManagedDataAccess.dll with C# returns ORA-00900 when comments enclosed by /* */ contains single quotes. Sometimes.

The code blocks sent are in C# code that look like this:

using System;

using Oracle.ManagedDataAccess.Client;

namespace OracleSingleQuotes

{

      class Program

      {

             static void Main(string[] args)

             {

                     int rows = 0;

. . .

               OracleCommand cmd = new OracleCommand();

                            cmd.Connection = conn;

                            cmd.CommandText = @"

                                   /*Bob's test*/

                                   select count(*)

                                   /*Bob's test*/

                                   from DUAL";

. . .

This generates an ORA-00900. If the single quote is not in the first line, it works fine. Single quotes in two comment lines at the beginning and in the 4th line

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center