When building a dynamic query, I quite often have the situation where the tables are referenced in a different order depending on the data the user has provided for the query. As a result, making sure the buffers in the dynamic query are referenced in the right order is quite a tricky business. I'd much rather have a situation where I could dynamically add the buffers in the right order too. In my last job we could do this by generating a list of the tables referenced and going through this list and using hQuery:ADD-BUFFER(BufferName). This worked fine. But here we have to prefix our table references with db.TableName due to table names duplicated across dbs connected. Progress doesn't like it when the name of the buffer you're trying to add is prefixed with the db name and errors saying it can't add the buffer.
My question is, has anyone worked out a way of adding buffers to a query dynamically that will work in this situation?
My question is, has anyone worked out a way of adding buffers to a query dynamically that will work in this situation?