joeller
OK I am kind of confused. Let's see if I am following this.
You instantiate a new dataset and then a new dataadapter.
Then you call the DataAdapter Fill method with a parameter of the dataset, without setting any kind of connection to the database
In my situation I have a schema file which I would be having to read in before the xml file. So what I did was
Code Snippet
Dim Ds As New DataSet
Dim
xmlDoc As New System.Xml.XmlDataDocument
Ds = xmlDoc.DataSet
Ds.ReadXmlSchema(Server.MapPath(
"App_Data\DEX403.xsd"))
xmlDoc.Load(Server.MapPath(
"App_Data\9004T.xml")
After adding a new DA instantiator and a and DA fill line like yours;
Code Snippet
Dim Ds As New DataSet
Dim
xmlDoc As New System.Xml.XmlDataDocument
Dim
daDSXML As New System.Data.OleDb.OleDbDataAdapter
daDSXML.Fill(Ds)
Ds = xmlDoc.DataSet
Ds.ReadXmlSchema(Server.MapPath("App_Data\DEX403.xsd"))
xmlDoc.Load(Server.MapPath("App_Data\9004T.xml")
I get the error message "The SelectCommand property has not been initialized before calling 'Fill'."
I can't make a select command because there is nothing in the database. The only things I want in the database are the things I am reading from the XML files. So unless I do something like "Select * from Sysobjects where 1 = 2" any select command is going to create false data in the dataset.