从我记事起就一直在工作的一行代码突然停止工作,现在抛出了 AccessViolationException:
例外:
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that
other memory is corrupt.
Source=Sybase.Data.AseClient
StackTrace:
at Sybase.Data.AseClient.AseConnectionPool.ᜀ(AseConnection A_0)
at Sybase.Data.AseClient.AseConnectionPoolManager.ᜀ(String A_0, AseConnection A_1)
at Sybase.Data.AseClient.AseConnection.Open()
InnerException:
代码:
using (var connection = new AseConnection(this.ConnectionString))
{
using (var command = connection.CreateCommand())
{
command.CommandText = "select * from TABLE_NAME";
command.Connection.Open();
...
我重新启动了我的机器,检查了最近的 Windows 更新,运行了 CHKDSK,卸载并重新安装了 Sybase,但似乎没有任何效果!
我的目标是使用 64 位 Sybase 12.5.4 客户端的 Sybase 12.5.4 数据库,其中在我的代码中引用了 Sybase.Data.AseClient.dll(与生产代码相同的版本 - 可以正常工作)并且 sybdrvado11.dll 在以下情况下可用应用程序正在运行。自上次工作以来,从字面上看没有任何改变。
使用 Toad,我仍然能够连接数据库并与之交互,所以看起来这个问题只会影响我的代码。
有没有人遇到过这个问题?