Well I am trying to write an XML file and want to utilize the datasets.WriteXml method. But I have a dataview that is created from a datatable that I need in order to filter the rows. So I want to use the information from the dataview to write and XML file. Is there anyway to utilize the .WriteXml method with the information from the dataview?
I pull information from a couple tables in SQL server with a datareader. And the table is not set up very well so there are multiple date fields that depend how far a client got in an application. So I have to use a datatable to combine the given date into one field. I then set the dataview equal to the datatable so I can filter the rows, and I want to take the dataview and somehow utilize the .WriteXml method.
Even if the SQL Database isn't "set up very well" there's nothing stopping you from writing the SQL statement (or Stored Procedure ideally) from returning the correct results. This is where the work should be done as returning incorrect results from a SQL statement and manipulating them on the client is quite simply backwards!
Once you get the correct results, you won't have to worry about DataViews as you can read the results straight into the DataSet.
Well the database has 10 smallint fields with corresponding dates that only get set if the smallint field has been changed from 0. So I have to go through and for each record find the last smallint field not set to zero with the next small int is set to 0 and then pull that date for my date field. And then I have to filter according to this specific date. Any ideas on how to do this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.