使用ADOQuery,进行select操作时,老是报下面的错:
Project MDIAPP.exe raised exception class EOleException with message 'OLE error 80004005'. Process stopped. Use Step or Run to continue.
SQL语句已经确定没有问题。
程序如下:
AQuery.Close;
AQuery.SQL.Text := 'select * from table';
AQuery.Open;
我用的是Delphi 6
哪位大侠知道是什么原因?应该怎么解决?
Project MDIAPP.exe raised exception class EOleException with message 'OLE error 80004005'. Process stopped. Use Step or Run to continue.
SQL语句已经确定没有问题。
程序如下:
AQuery.Close;
AQuery.SQL.Text := 'select * from table';
AQuery.Open;
我用的是Delphi 6
哪位大侠知道是什么原因?应该怎么解决?
AQuery.Clear;
AQuery.SQL.Add( 'select * from table');
AQuery.Open;
我试了楼上的所有办法,都不行:(
你用text直接赋值的话确实不需要clear,但推荐使用clear+add的方式我觉得是没有成功连接数据库
楼猪F7跟踪下去
试过了,还是不行,前天还正常,昨天下午才发现出问题。跟踪到open语句时就自动跳出cpu窗口,然后运行几步就报那个错误。或者报“未指定的错误”.急死了.
AQuery.Clear;
AQuery.SQL.Add( 'select * from table');
AQuery.Open;