aspTest是个TADOStoredProc组件,与其他TADOStoredProc组件使用一个TADOConnection,下面两个语句连在一起,第二条语句当条件成立时出错,有可能是什么问题呢?if aspTest.State <> dsInactive then aspTest.Close;
if aspTest.Connection.Connected then aspTeslt.Connection.Close;
if aspTest.Connection.Connected then aspTeslt.Connection.Close;
解决方案 »
- 请问有人做过:通过COM口衍射成 IP 地址,然后对多个 或 四百个点(下位机)进行读写数据的,有吗?
- 怎样将窗口提前?
- table查询问题!小弟急用!!
- 如何用代码实现获得本地计算机名
- 对真正程序员的考验。。。。
- 再来问一个简单的radiobox的问题,异常简单,可结果就不对。郁闷!
- DCOM服务器如何在客户端注册?
- 请问如何让窗体根据机器设置的分辨率做不同的调整啊!!
- 如何取得某个表中的某个字段的字段类型?
- 老千,偶想找几本书,却找不到好的网站,超星馆今天太慢了,偶知道你有许多资源,能透漏一点吗?//牛虻
- 哪里有EQGrid421 for d7,最好包含dxDBtreelist的可供下载?
- 各位大侠帮帮忙,在线等,立即给分!
if aspTest.Connection.Connected then aspTest.Connection.Close;
请问什么情况下第二条语句出错呢?
if aspTest.Connection.Connected then
aspTest.Connection.Connected:=false;
procedure TCustomConnection.Close;
begin
SetConnected(False);
end;
时出现下面错误信息:Project Test_Query.exe raised exception class EAccessViolation with message 'Access violation at address 0051E082 in module 'Test_Query.exe'. Read of address 00000000'. Process stopped. Use Step Run to continue.
这条语句本身没有错误,但总是由它触发了错误,真是头痛。