I need to create a temporary table in SQL (#results) That I can then bind to a Listview to display the results a a search that will be persistant for as long as the user is logged in. The search results fields willl vary dependant on the criteria, and the query SQL will be build up depending on the criteria, so I need to programmatically create the temporary table, populate it and then bind it to the listview.
Clearly, static tables are no good, as different users will be searching on different things at the same time. I know how to create temporary table in SQL natively, but need some help to create them dynamically in VBH.net.
I don't think stored procedures are the solution either as every query will be slightly different.
Any help would be much appreciated.