Hello fellas,
A little background for you in my app against some fields the user has a browse button, this button brings up a listview with the availiable field values.
The user is able to change what fields are shown in this list, for example the customer browser might just show
Customer Code
Customer Name
But the user needs to see the post code too in this list and also be able to search against this field. The way this is implemented is the listview gets its column names / rows from a datatable which is populated view a SQL string stored in the my.settings of my app. This approach allows the user to modify the browse window by use of aliases in that SQL String
so field CUS_CODE can become Code or Cus Code or whatever the user wants in the browser.
My problem is when i come to build the WHERE clause which i will append to the end of this SQL string to filter the results given
(a second tab on the browser is loaded with a text box for every field in result set, which i then use to build a WHERE clause)
Because i use aliases in the SQL statement to make it easier for user, i now need to get back to the original field name from the alias, at the moment i get an error because column name "Code" doesnt exist in the customers table.
Hopefully you see what i mean, thanks in advance
A little background for you in my app against some fields the user has a browse button, this button brings up a listview with the availiable field values.
The user is able to change what fields are shown in this list, for example the customer browser might just show
Customer Code
Customer Name
But the user needs to see the post code too in this list and also be able to search against this field. The way this is implemented is the listview gets its column names / rows from a datatable which is populated view a SQL string stored in the my.settings of my app. This approach allows the user to modify the browse window by use of aliases in that SQL String
so field CUS_CODE can become Code or Cus Code or whatever the user wants in the browser.
My problem is when i come to build the WHERE clause which i will append to the end of this SQL string to filter the results given
(a second tab on the browser is loaded with a text box for every field in result set, which i then use to build a WHERE clause)
Because i use aliases in the SQL statement to make it easier for user, i now need to get back to the original field name from the alias, at the moment i get an error because column name "Code" doesnt exist in the customers table.
Hopefully you see what i mean, thanks in advance