T
TJ
I'm trying to upgrade old code in .NET 1.0 to use the data access
application block (June 2005 version).
I'm trying to do this:
SqlCommand custCMD = new SqlCommand(sql, conn);
conn.Open();
XmlTextReader rdr = (XmlTextReader)custCMD.ExecuteXmlReader();
But guess what, there is no ExecuteXmlReader in data access app block, at
least the way I use it, I try this:
Database db = DatabaseFactory.CreateDatabase("myDatabaseName");
DBCommandWrapper dbc = db.GetSqlStringCommandWrapper(mySql);
XmlTextReader rdr = (XmlTextReader)db.ExecuteXmlReader(dbc); <----- THIS
DOESNT EXIST
There is no ExecuteXmlReader off the db object, so what I've written above
won't work.
How do I implement the ExecuteXmlReader using the data access app block in
1.0?
application block (June 2005 version).
I'm trying to do this:
SqlCommand custCMD = new SqlCommand(sql, conn);
conn.Open();
XmlTextReader rdr = (XmlTextReader)custCMD.ExecuteXmlReader();
But guess what, there is no ExecuteXmlReader in data access app block, at
least the way I use it, I try this:
Database db = DatabaseFactory.CreateDatabase("myDatabaseName");
DBCommandWrapper dbc = db.GetSqlStringCommandWrapper(mySql);
XmlTextReader rdr = (XmlTextReader)db.ExecuteXmlReader(dbc); <----- THIS
DOESNT EXIST
There is no ExecuteXmlReader off the db object, so what I've written above
won't work.
How do I implement the ExecuteXmlReader using the data access app block in
1.0?