Adam,
Return the XML for the recordset, not the recordset itself. The following
example works:
[WebMethod]
public string GetRecordXML()
{
// Create a recordset object
Recordset rs = new Recordset();
// Create a stream object
Stream streamObj = new Stream();
// Query a table for a recordset
rs.Open("SELECT * FROM MyTable",
"dsn=LocalServer;UID=usernamehere;PWD=enter password here",
CursorTypeEnum.adOpenStatic, LockTypeEnum.adLockReadOnly, 1);
// Save the recordset's XML representation in a stream object
rs.Save(streamObj, PersistFormatEnum.adPersistXML);
// Get the string (XML) of the recordset
string outputXml = streamObj.ReadText(str.Size);
return outputXml;
}
When you get the recordset on the client side, you need to re-create it
using Open.
--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Adam Short" <> wrote in message
news:%...
> When returning an ADO Recordset via Web Services I get the following
error:
>
> Cannot serialize interface ADODB.Recordset
>
> Any Ideas?
>
> --
> Phuture-UK +44 (01202) 518122
>
>