SQL and C#, getting table structures - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

SQL and C#, getting table structures

two questions:
1. I'm trying to get the structure of a table without going thru the SQL interface, I want to do it programmatically, so that I can build an interface that will adapt to the changes in the table without knowing the changes. In other words the program will read the structure of the table, and handle it.

Example: you have:
Name char(10)
in a table, I'd like to get that information (column name, length, type) from sql using C#.

I'd also need to get a list of the tables that a database has.

The second question is forcing a gridview's current record to move, not with up/down arrows keys, but [Prev] [Next] buttons. I can find which is the current record in a set, but haven't been able to move/change it.

Thanks, KarlJay.
Sign In or Register to comment.