Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Connectivity » View Thread |
Messages 1 to 6 of 6 total |
Cannot Close a Query |
Thu, Feb 25 2010 10:23 AM | Permanent Link |
"Jim Garrity" | I have 2 out of dozens of queries where when I try to Close the query I get
a message "Cannot perform this operation on a closed dataset" The DataSet.Active property shows true. So far I cannot see any difference between how these queries are used as opposed to others that work just fine. Here is the code: if fIsQuery then begin // its a TEDBQuery DataSet.Close; DataSet.Open; end else DataSet.Refresh; // Its a TEDBtable The query in one case is: procedure TBilling.SelectGlobal; begin with sdsQuery do begin // this is a TEDBQuery Close; with Sql do begin Clear; Add ('select * from vwBilling'); end; Open; end; if not assigned (DataSet) then SetDataSet (sdsQuery); end; |
Thu, Feb 25 2010 8:00 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jim,
<< I have 2 out of dozens of queries where when I try to Close the query I get a message "Cannot perform this operation on a closed dataset" The DataSet.Active property shows true. So far I cannot see any difference between how these queries are used as opposed to others that work just fine. >> Do you have any event handlers attached to these datasets ? I would recompile the application with Use debug .dcus enabled, and then see where the debugger points when the exception occurs. That should tell you what is triggering the exception. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 26 2010 1:54 PM | Permanent Link |
Jim Garrity SDS | "Tim Young [Elevate Software]" wrote:
Jim, << I have 2 out of dozens of queries where when I try to Close the query I get a message "Cannot perform this operation on a closed dataset" The DataSet.Active property shows true. So far I cannot see any difference between how these queries are used as opposed to others that work just fine. >> Do you have any event handlers attached to these datasets ? I would recompile the application with Use debug .dcus enabled, and then see where the debugger points when the exception occurs. That should tell you what is triggering the exception. -- Tim Young Elevate Software www.elevatesoft.com No event handlers involved. I recompiled and can trace it. The problem is when I make sure that ReadOnly = true on the dataset. That seems to be Ok. But after I Open the dataset, ReadOnly is false again. The problem is probably tied to the fact that I can no longer edit any tables in any DB's even in the EDBMgr. I have rebooted the machine and no change. I may have caused the problem when I attempted to open a DB on a another machine. The timing seems right. I can run my program on the other machine from this machine Ok. I do this all the time. Is this a B7 issue? I saw something that might be relevant but it had to do with Vista (this is strictly an XP environment) |
Fri, Feb 26 2010 2:57 PM | Permanent Link |
Jim Garrity SDS | Philip J Garrity wrote:
"Tim Young [Elevate Software]" wrote: Jim, << I have 2 out of dozens of queries where when I try to Close the query I get a message "Cannot perform this operation on a closed dataset" The DataSet.Active property shows true. So far I cannot see any difference between how these queries are used as opposed to others that work just fine. >> Do you have any event handlers attached to these datasets ? I would recompile the application with Use debug .dcus enabled, and then see where the debugger points when the exception occurs. That should tell you what is triggering the exception. -- Tim Young Elevate Software www.elevatesoft.com No event handlers involved. I recompiled and can trace it. The problem is when I make sure that ReadOnly = true on the dataset. That seems to be Ok. But after I Open the dataset, ReadOnly is false again. The problem is probably tied to the fact that I can no longer edit any tables in any DB's even in the EDBMgr. I have rebooted the machine and no change. I may have caused the problem when I attempted to open a DB on a another machine. The timing seems right. I can run my program on the other machine from this machine Ok. I do this all the time. Is this a B7 issue? I saw something that might be relevant but it had to do with Vista (this is strictly an XP environment) It appears now that the Ddatabase is readonly. I tried to choose Repair table and I get the error message #403 Office_Navigator is readonly. How can I change that? Also I don't know how it got to be readonly in the first place. If I change to a different database it also is read only. |
Fri, Feb 26 2010 3:21 PM | Permanent Link |
Jim Garrity SDS | "Jim Garrity" wrote:
I have 2 out of dozens of queries where when I try to Close the query I get a message "Cannot perform this operation on a closed dataset" The DataSet.Active property shows true. So far I cannot see any difference between how these queries are used as opposed to others that work just fine. Here is the code: if fIsQuery then begin // its a TEDBQuery DataSet.Close; DataSet.Open; end else DataSet.Refresh; // Its a TEDBtable The query in one case is: procedure TBilling.SelectGlobal; begin with sdsQuery do begin // this is a TEDBQuery Close; with Sql do begin Clear; Add ('select * from vwBilling'); end; Open; end; if not assigned (DataSet) then SetDataSet (sdsQuery); end; Ok. It looks like I found a fix. I deleted the config files and restarted and now the databases are no longer readonly. The config file probably was corrupted when I tried the "illegal" connection. |
Mon, Mar 1 2010 7:57 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jim,
<< Ok. It looks like I found a fix. I deleted the config files and restarted and now the databases are no longer readonly. The config file probably was corrupted when I tried the "illegal" connection. >> Did you ever try to alter the database at all when you were connected to the other machine ? The only issue that vaguely resembles this is this one: http://www.elevatesoft.com/incident?action=searchview&category=edb&incident=2968&start=1&keywords=alter -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, May 15, 2024 at 08:40 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |