我有一个正在测试的程序,我想查看“幕后”的代码,特别是 OpenWithNewPassword方法(可能必须在页面上按 Ctrl+F)。是否有类似于Oracle 提供的来自 Microsoft的Reference Source的东西?我唯一能找到的是对方法是什么以及它的作用的定义。
using System;
using Oracle.DataAccess.Client;
class PasswordExpirationSample
{
static void Main()
{
OracleConnection con = new OracleConnection();
try
{
con.ConnectionString =
"User Id=testexpire;Password=testexpire;Data Source=oracle";
con.Open();
Console.WriteLine("Connected to Oracle" + con.ServerVersion);
}
catch (OracleException ex)
{
Console.WriteLine(ex.Message);
//check the error number
//ORA-28001 : the password has expired
if (ex.Number == 28001)
{
Console.WriteLine("\nChanging password to panther");
con.OpenWithNewPassword("panther"); // What call is this making with the database?
Console.WriteLine("Connected with new password.");
}
}
finally
{
// Close and Dispose OracleConnection object
con.Close();
con.Dispose();
Console.WriteLine("Disconnected");
}
}
}