S
SimeonD
Hi
I will need to send some data to a third party on a weekly basis. They have
sent me an XSD file, Policy.XSD.
I'm using VB 2005. I added the XSD to my project, set the CustomTool to
'MSDataSetGenerator'. Visual Studio then created a Policy.Designer.vb file.
My data is stored in SQL server.
I'm looking for some guidance on the best way forward. I don't know much
about XML and XSD, but I'm ok on ADO. (yes, I know Dataset is related to
XSD, but I never had to worry about it before)
So some questions
1) In my datasources window, I have the SQL Server datatables. Is there any
quick way to get the data from there into the Policy dataset?
2) I've experimented adding data to the Policy dataset. Like below. The
dataset seems to consist of several datatables, with relationships. This
relationships are now in Policy.Designer.vb code. Is there an easy way to
print off the relationships?
Its making it difficult to test, when certain elements have to link
elsewhere.
Dim dsComm As New CommPolicy.NewDataSet
Dim dtBusiness As CommPolicy.NewDataSet.BusinessDataTable =
dsComm.Business
Dim rowBusiness As CommPolicy.NewDataSet.BusinessRow = Nothing
rowBusiness = dtBusiness.NewBusinessRow
rowBusiness.Business_Id = 1
rowBusiness.Turnover = 2000
dtBusiness.AddBusinessRow(rowBusiness)
3) I'm unclear on how I would a new entry. In the example, I've added a new
row for one policy. How would I add a row for a second policy?
4) If you're done this kind of thing before, can you give me some hints on
how to make things easier.
Thanks!
Simeon
I will need to send some data to a third party on a weekly basis. They have
sent me an XSD file, Policy.XSD.
I'm using VB 2005. I added the XSD to my project, set the CustomTool to
'MSDataSetGenerator'. Visual Studio then created a Policy.Designer.vb file.
My data is stored in SQL server.
I'm looking for some guidance on the best way forward. I don't know much
about XML and XSD, but I'm ok on ADO. (yes, I know Dataset is related to
XSD, but I never had to worry about it before)
So some questions
1) In my datasources window, I have the SQL Server datatables. Is there any
quick way to get the data from there into the Policy dataset?
2) I've experimented adding data to the Policy dataset. Like below. The
dataset seems to consist of several datatables, with relationships. This
relationships are now in Policy.Designer.vb code. Is there an easy way to
print off the relationships?
Its making it difficult to test, when certain elements have to link
elsewhere.
Dim dsComm As New CommPolicy.NewDataSet
Dim dtBusiness As CommPolicy.NewDataSet.BusinessDataTable =
dsComm.Business
Dim rowBusiness As CommPolicy.NewDataSet.BusinessRow = Nothing
rowBusiness = dtBusiness.NewBusinessRow
rowBusiness.Business_Id = 1
rowBusiness.Turnover = 2000
dtBusiness.AddBusinessRow(rowBusiness)
3) I'm unclear on how I would a new entry. In the example, I've added a new
row for one policy. How would I add a row for a second policy?
4) If you're done this kind of thing before, can you give me some hints on
how to make things easier.
Thanks!
Simeon