プライマリ・コンテンツに移動
Oracle® Data Provider for .NET開発者ガイド
ODAC 12.2c リリース1 (12.2.0.1) for Microsoft Windows
E88311-03
目次へ移動
目次
索引へ移動
索引

前
次

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);
    }
  }
}