Jump to content

ADO Requery Method against SQL Server


mluciuk

Recommended Posts

I am attempting to use an ADODataSource and trying to get it to perfrom a Requery when my user has modified a table column via a DataGrid control.I have been able to get the Requery Method to work, but keep getting an ADODB.Recordset popup coming up, after the requery, that the "Operation is not allowed when the object is open".Have tried numerous settings in an attempt to get this resolved, but with my limited ADO background, I am now stumped.Any ideas out there?

Link to comment
Share on other sites

HelloSome background may be necessary. I am developing this application with a product called PowerCOBOL which generates much of the code in a structured, not really for human eyes format. If I were to post this code, I doubt anyone would be willing to pour through this code to “debug” it.I am working in an XP Pro environment talking to SQL Server 2000 database over ODBC connections. My application is a simple display/update of a single column SQL table (T1). Using ADODatasource and DataGrid controls. My query via the ADODataSource (select) results in two columns (the column off of T1 (lets call it C1) and a calculated column (lets call it C2). C2 is calculated based on the value in C1.When I change the C1 value of a row, I need C2 to be recalculated. This is where I want to use the Recordset Requery method.Having said that, what I need is a better conceptual understanding of what is required to solve why I may be getting the popup and what object is it referring to ("Operation is not allowed when the object is open"). I am assuming the object being referred to is, indeed, the Recordset object.I have tried explicitly closing and reopening the recordset object, which yields the same result.I would like to draw on the experience of some experts who might be able to point me in the right direction and offer some insight as to what the problem might be. As such I would like to keep it at a conceptual level.This is my first attempt at use of ADO objects and maybe I’m missing something like “the connection has to be closed and then reopened”. Documentation I have seen on W3Schools had this to say about Recordsets – “Not all providers support all methods or properties of the Recordset object.”. Maybe this is what I am experiencing.Any insight/direction anyone might provide would be appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...