SQL Query On DataTable
-
Hi, I have a DataTable that is being generated during runtime with values from the memeory. Now my question is,is there a way you can run a sql query against the data in the datatable so that it can return data in a specifik format? In my datatable there is for example three columns called A,B,C and I want to do someting to retrieve that data with the column names Name,Surname,Age instead of A,B,C for example. Like giving an alias to the column names when retrieving the data from the datatable. Any Help is greatly appreciated.
-
Hi, I have a DataTable that is being generated during runtime with values from the memeory. Now my question is,is there a way you can run a sql query against the data in the datatable so that it can return data in a specifik format? In my datatable there is for example three columns called A,B,C and I want to do someting to retrieve that data with the column names Name,Surname,Age instead of A,B,C for example. Like giving an alias to the column names when retrieving the data from the datatable. Any Help is greatly appreciated.
You should be able to use DataTable.Select()[^] to query your DataTable. As for your column names, give them whatever name you like when you create your DataTable, see here[^]
Yusuf May I help you?