H
h4xPace
I am building a MySQL query application, and I have run into a small
snag. MySQL has released a set of classes that extend the .NET
framework base data classes (command, connection, etc), and I am using
them to interact with the MySQL server (on localhost). Everything
works great on that side of the aisle.
However, I have never worked with getting schema from a database
before, so I am fumbling around for a workable solution to doing this.
I can get the --entire-- schema from the database with :
DataTable1 = MySqlConnection.GetSchema("Tables")
But this fills the data table with a ton of usless (to me) schema
info. I can cludge my way through selecting only the tables that I
want, but I feel like there has to be a better way.
What I want to accomplish in the end:
A treeview control that lists fields in the selected MySQL database
schema:
EX:
Table1
----Field1
----Field2
----Field3
Table2
----Field1
.....
Just like the treeview on the Server Explorer in VS. You get the
point. The treeview reference is just to illustrate the scope of the
data I need. Its a strategy for getting individual databas / table
schema from the server that I am struggling with.
Any help, a link, whatever would be greatly appreciated.
-Chris
snag. MySQL has released a set of classes that extend the .NET
framework base data classes (command, connection, etc), and I am using
them to interact with the MySQL server (on localhost). Everything
works great on that side of the aisle.
However, I have never worked with getting schema from a database
before, so I am fumbling around for a workable solution to doing this.
I can get the --entire-- schema from the database with :
DataTable1 = MySqlConnection.GetSchema("Tables")
But this fills the data table with a ton of usless (to me) schema
info. I can cludge my way through selecting only the tables that I
want, but I feel like there has to be a better way.
What I want to accomplish in the end:
A treeview control that lists fields in the selected MySQL database
schema:
EX:
Table1
----Field1
----Field2
----Field3
Table2
----Field1
.....
Just like the treeview on the Server Explorer in VS. You get the
point. The treeview reference is just to illustrate the scope of the
data I need. Its a strategy for getting individual databas / table
schema from the server that I am struggling with.
Any help, a link, whatever would be greatly appreciated.
-Chris