Jump to content

mluciuk

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by mluciuk

  1. mluciuk

    indexing fields

    Indexing should match the nature of the query you want to improve the perfromance of. Indexing on individual columns into individual indexes does little nothing to increase performance on a query where you are selecting based on two or more columns.ExampleTable T1 has columns C1, C2, C3........The query you wish to improve the performance on looks likeSelect * from T1 where C1 = value1 and C3 = value3A combined index on C1 and C3 will help.SQL optimizer can select only one index to use for the query. He will pick the best one available. He will not combine indexes nor will he tell you how to structure your index. It is up to you to create appropriate indexes.Having said that, note that there is overhead involved in the creation and maintenance of indexes. If you can afford the space and your database/application can afford the time to maintain the index (indexes are updated automatically as you update the data they are based on), an index can turn a snail query into a cheetah.Good luck
  2. 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.
  3. 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?
×
×
  • Create New...