"*" select in the table should replace *in the select query with column names.
Hi,
I have some selected fields in the XML to generate metadata. While designing the query, if I use * selector for the query, it fetches all column from the database.
Instead, on selecting *, I want to put the column name list in the query. So the user does not get all the columns from the database. Only the columns that are in the design query pane, gets fetched
I don't want to run a loop. Is there a function / option that will replace * with output columns.
I tried QueryTransformer .AlwaysExpandColumnsInQuery = True. Even after selecting all the columns, if I click * it adds all the columns again. Let me know how to avoid this
Is there a way to disable / hide the * option in the table.
Looking forward to your reply.
Hello, Rujuta.
As usual, there are several ways to cope with this problem.
The first is just to hide the asterisk item from all datasources as you suggested. This can be done by setting the QueryBuilder.DataSourceOptions.HideAsteriskItem property to True.
Another approach is to handle the QueryBuilder.DataSourceFieldAdded event and correct the query. The sample event handler code is below.
Alternatively, we may consider changing the behaviour of the asterisk item, so that it acts as an aggregated checker/unchecker for the rest of the datasource fields, but this is not possible in the current version.