dir all
I have datareader object that holds an sql (select *) result. i need to know how many columns this datagrid holds - the result of the sql is comming from access file - mabe i can retrieve this data by sql to the access file???
thnks
Printable View
dir all
I have datareader object that holds an sql (select *) result. i need to know how many columns this datagrid holds - the result of the sql is comming from access file - mabe i can retrieve this data by sql to the access file???
thnks
All the datareaders have a FieldCount property - this should do what you want - DataReader1.FieldCount
Also you can access the number of columns a DataGrid contains - DataGrid1.Columns.Count
HTH
DJ
thnks alot - you helped me
the FieldCount is better for me because im generating script to the client in the server and i don use datagrid to show data.
Thnks alot