![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to write a program that will take all the members of a data base, add them to a tree, with all child relations as sub-nodes. I am having a problem getting the parent child relations for each table & query. Dim tblCurrent As DataTable Dim strTableName As string For Each tblCurrent In Ds1.Tables strTableName = tblCurrent.TableName.ToString Next This gives me my table names. I can also get column names the same way. .GetXMLSchema shows me what I want, but I don't want to even think about dissecting that string data to make it usefull to me. How can I get the name of any parent or child tables for tblCurrent? -- Thanks in advance for any help / Sean the Mc / "I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931) |
#3
| |||
| |||
|
|
I tried the following, but get an "invalid cast exception" on the "dt = Con.GetOleDbSchemaTable..." line. I'm using an Access DB. Can anyone tell me whats wrong here? Thanks in Advance /// Dim dt As New DataTable() Ds1.Tables.Add(dt) dt = Con.GetOleDbSchemaTable(OleDbSchemaGuid.Table_Cons traints, New Object()) Dim f As New frmDG() f.dg1.DataSource = dt f.ShowDialog() \\\ -- / Sean the Mc / "I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931) "What-a-Tool" <Die!FrigginSpammersDieDie!@NoShitSherlock.Net> wrote in message news:wSSyb.7288$Yt4.4568 (AT) lakeread05 (DOT) .. I am trying to write a program that will take all the members of a data base, add them to a tree, with all child relations as sub-nodes. I am having a problem getting the parent child relations for each table & query. Dim tblCurrent As DataTable Dim strTableName As string For Each tblCurrent In Ds1.Tables strTableName = tblCurrent.TableName.ToString Next This gives me my table names. I can also get column names the same way. .GetXMLSchema shows me what I want, but I don't want to even think about dissecting that string data to make it usefull to me. How can I get the name of any parent or child tables for tblCurrent? -- Thanks in advance for any help / Sean the Mc / "I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931) |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |