joeybagadonutz
Well-known member
- Joined
- Nov 6, 2003
- Messages
- 72
Hi.
My goal here is to import an xml file into my sql server database. (Im semi new to using xml)
First, I am importing the xml file into a dataset using ReadXml. When I first did this, I would bind a datagrid to the dataset, and it worked great, but it was in a hierchechal style view....with plus symbols etc that would expand the records into more detailed information. This isnt really what I wanted, I just want to import all the info into a single table....but, I discovered that the dataset actually consists of 14 different tables after I import the xml file.
Theoretically, this would be fine, I can just create 14 tables in my database...(or create my own table with what i want in code) but what Im mega confused about is that some of the tables have no relational field whatsoever to the other tables. So I do not understand how the data tables in my dataset relate to each other. (i created 14 datagrids on a form and populated them all with thier respective table from the dataset, and there is no field displayed to relate them). I assume this is because the dataset was created from xml and somehow it knows how they are related...but I dont know how to access that information.
Anyway, how do I relate these 14 tables in my dataset together so I can populate tables in my database and be able to use them? (I thought of adding a field to each table in code and relate them that way, but that wont work as I wont be able to relate it in my code either ) What am I missing here? thanks much, I do appreciate any assistance.
-JBD
My goal here is to import an xml file into my sql server database. (Im semi new to using xml)
First, I am importing the xml file into a dataset using ReadXml. When I first did this, I would bind a datagrid to the dataset, and it worked great, but it was in a hierchechal style view....with plus symbols etc that would expand the records into more detailed information. This isnt really what I wanted, I just want to import all the info into a single table....but, I discovered that the dataset actually consists of 14 different tables after I import the xml file.
Theoretically, this would be fine, I can just create 14 tables in my database...(or create my own table with what i want in code) but what Im mega confused about is that some of the tables have no relational field whatsoever to the other tables. So I do not understand how the data tables in my dataset relate to each other. (i created 14 datagrids on a form and populated them all with thier respective table from the dataset, and there is no field displayed to relate them). I assume this is because the dataset was created from xml and somehow it knows how they are related...but I dont know how to access that information.
Anyway, how do I relate these 14 tables in my dataset together so I can populate tables in my database and be able to use them? (I thought of adding a field to each table in code and relate them that way, but that wont work as I wont be able to relate it in my code either ) What am I missing here? thanks much, I do appreciate any assistance.
-JBD