6.3.4.8 SchemaSeparator

このプロパティでは、スキーマ識別子と他の識別子の間のセパレータ用文字を指定します。

宣言

// C#
public override string SchemaSeparator {get; set; }

プロパティ値

スキーマ・セパレータとして使用される文字。

例外

NotSupportedException - 入力値はピリオド(.)ではありません。

備考

デフォルトのスキーマ・セパレータはピリオド(.)です。このプロパティで受容可能な値はピリオド(.)のみです。

このプロパティは、OracleConnectionまたはOracleCommandオブジェクトのいずれからも独立しています。

// C#
 
using System;
using System.Data;
using System.Data.Common;
using Oracle.DataAccess.Client;
 
class SchemaSeperatorSample
{
  static void Main(string[] args)
  {
    try
    {
      OracleCommandBuilder cmdBuilder = new OracleCommandBuilder();
 
      //schemaSeparator is dot(.)
      Console.WriteLine("schemaSeparator is {0}", 
                            cmdBuilder.SchemaSeparator);
 
      //set the schemaseparator, only '.' is allowed.
      cmdBuilder.SchemaSeparator = ".";
 
      // the only acceptable value for this property is a dot (.)
      // Hence the following line will throw NotSupportedException
      cmdBuilder.SchemaSeparator = "!";
    }
    catch (Exception ex)
    {
      Console.WriteLine(ex.Message);
      Console.WriteLine(ex.StackTrace);
    }
  }
}