Hi,
I have query which retrieves columns from 4 tables using join statement.Now I want to store the column name or alias name of the field name of that query.please help me how to retrieve them?
Example If I have table called A,B,C which have columns like Aa,Ab,Ac,Ba,Bb,Bc,Ca,Cb Respectively then in join statement I`l retrieve Aa,Bb,Ca,Cb
Now I want to save Column name Aa,Bb,Ca,Cb
解决方案Hi,
If you are executing your query and your result is in form of DataSet the you can get each column name using DataColumn
Please check this[^] discussion, you can find your answer from there.
Let me know if you are not storing your query result in DataSet.
Good luck
Thanks
-Amit Gajjar
string[] columnNames = dtGrid.Columns.Cast().Select(x => x.ColumnName).ToArray();
PLz Explain a little More , . Check For into in u query Plz Explain .