Hello,
I´ve a problem with the return values of a database (MS SQL) query.
My code looks like this:
foreach (DataRow row in dt.Rows)
{
this.fingerprints.Add(new DocumentFingerprint(row["record_id"],
row["XMLString"]));
}
My class DocumentFingerprint is defined as:
public DocumentFingerprint(int record_id,
XmlDocument documentXMLString)
In the Database row["record_id"] is defined as int
and row["XMLString"] is defined as "xml".
My question is now... how do I have to cast what?
When I retrieve row["record_id"] and row["XMLString"] both are "Objects"
and neither "int" nor "xml"/ "XmlDocument".
How do I convert a "xml" value from the database to an "XmlDocument"?
Regards,
Martin