我正在使用IOLEDBConnection
对象,并且更改MaxDrillthoughRecords
字段按预期工作。但是,我还需要更改Connection
的{{1}}字段,当我这样做时,IOLEDBConnection
字段设置为1000.我不希望这种情况发生。
MaxDrillthroughRecords
我尝试使用Reflector来查看IOLEDBConnection oleConnection = connection.OLEDBConnection;
try
{
this.SetMaxDrillthroughRecords();
var a = oleConnection.MaxDrillthroughRecords; // MaxDrillthroughRecords is 5 here.
oleConnection.Connection = new object[] { connection.ConnectionString };
a = oleConnection.MaxDrillthroughRecords; // MaxDrillthroughRecords is 1000 here.
}
finally { Marshal.ReleaseComObject(oleConnection); }
程序集中的代码,但奇怪的是无法找到该接口。我在这里缺少一些微妙的行为吗?谢谢你的帮助。