.NETでOracleを使用するのは初めてです。私は過去にSQLを使用したことがありますが、この問題は発生していません。この接続文字列で接続するOracleサーバーがあります。
<add key="Test" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=xxx))); User Id=xxxxxxx;Password=xxxxxx;"/>
private OracleConnection Testconnection = new OracleConnection((string)new System.Configuration.AppSettingsReader().GetValue("Test", typeof(string)));
次に、接続を開いて、開いているかどうかを確認し、次のoracleコマンドを実行してみます。
var accountOpenDate = new OracleCommand("select creationDate from tbl_user where id=:userid", this.Testconnection);
getIsbAaccountOpenDate.Parameters.Add(":userid", this.IsbUserId);
string isbAccountOpenDate = getIsbAaccountOpenDate.ExecuteNonQuery().ToString();
Oracleコマンドは適切であり、SQL Developerで実行すると機能しますが、コードを実行すると、isbAccountOpenDateの値は-1になります。私はすべてを試したので、もう何をすべきかわからない。
前もって感謝します