5

source.Open(); を押すと、このエラーが発生します。コード行と私はその理由を理解できません。管理されていない dll を使用していましたが、バージョン Oracle.ManagedDataAccess.dll 64 ビットにアップグレードしようとしています。私のプロジェクトは .NET Framework 4 を使用しています。名前と値)。エラーから、何かが明らかに間違っているように見えますが、うまく動作しません。

app.config の TNS:

<oracle.manageddataaccess.client>
<version number="*">
  <dataSources>
    <dataSource alias="ABC_DEF_GH" descriptor="ABC_DEF_GH =    (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = server.company.com)(PORT = 11111))(CONNECT_DATA = (SERVICE_NAME = ABC_DEF_GH.company.com)))"/>
  </dataSources>
</version>

</oracle.manageddataaccess.client>

コードスニペット:

using (OracleConnection source = new OracleConnection("UserId=xxxxx;Password=xxxxxx;DataSource=ABC_DEF_GH;"))
{

OracleCommand command = new OracleCommand(transferConfig.QueryLogic + WhereClause, source);
//The time (in seconds) to wait for the command to execute. The default is 30 seconds.
command.CommandTimeout = transferConfig.SourceCommandTimeout;
// command.Connection.ConnectionTimeout is set in the connection string only
source.Open();
//...
}

エラー: ORA-00303: ネットワーク ライブラリ: 名前と値の構文エラー

4

1 に答える 1