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!


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.