static void Main(string[] args)
    {
        OracleCommandBuilder builder = new OracleCommandBuilder();
        string quoteIdentifier       = builder.QuoteIdentifier("US\"ER");

        //quoteIdentifier for "US\"ER" is (\"US\"\"ER\")
        Console.WriteLine("quoteIdentifier is {0}", quoteIdentifier);
    }
Example #2
0
    static void Main(string[] args)
    {
        //create an OracleCommandBuilder object.
        OracleCommandBuilder builder = new OracleCommandBuilder();

        string identifier = "US\"ER";

        Console.WriteLine("Identifier is {0}", identifier);

        // quote the identifier
        string quoteIdentifier = builder.QuoteIdentifier(identifier);

        //quoteIdentifier of "US\"ER" is (\"US\"\"ER\")
        Console.WriteLine("QuotedIdentifier is {0}", quoteIdentifier);
        string unquoteIdentifier = builder.UnquoteIdentifier(quoteIdentifier);

        //And its unquoteIdentifier is US\"ER
        Console.WriteLine("UnquotedIdentifier is {0}", unquoteIdentifier);
    }
 /// <summary>
 /// Returns Oracle quoted column identifier
 /// </summary>
 /// <param name="identifier">Column identifier</param>
 /// <returns>Oracle quoted column identifier</returns>
 protected override string GetQuotedIdentifier(string identifier) => builder.QuoteIdentifier(identifier);
        public static string QuoteSchemaAndTable(this string sqlQuery, string schemaName, string tableName)
        {
            var cb = new OracleCommandBuilder();

            return(string.Format(sqlQuery, cb.QuoteIdentifier(schemaName), cb.QuoteIdentifier(tableName)));
        }
 public static string QuoteSchemaAndTable(this string sqlQuery, string schemaName, string tableName)
 {
     var cb = new OracleCommandBuilder();
     return string.Format(sqlQuery, cb.QuoteIdentifier(schemaName), cb.QuoteIdentifier(tableName));
 }