Hi,
We are serializing an ADO recordset whose size is about 8 MB. The query to retrieve the ADO recordset take 2 seconds. But the act of serializing the recordset into XML is taking 130 seconds. Below is the code we are using. We would like to know if there is a better way to convert an ADO recordset to a serializable string.
private string RsToString(ADODB.Recordset rsIN) {< XML:NAMESPACE PREFIX = O />
if (rsIN != null)
{ Stream streamObj = new Stream();
rsIN.Save(streamObj, PersistFormatEnum.adPersistXML);
// Get the string (XML) of the recordset
string xmlRS = streamObj.ReadText(streamObj.Size);
return xmlRS;
}
else
return null;
}
Thanks.
Dwight
.NET Development25
|