Peter,
Thank you for your response. In this project I am not creating a
recordset, a recordset is being sent to it from a classic asp application as
a paramater. This is running as a piece of the middleware between the the asp
UI and another web service that is communicating with a main frame cobol
application. I need to accept this recordset, put the data from fields into a
fixed length string to send on the the other web service which in turn runs a
cobol transaction on the main frame. The other web service and main frame
application are owned by another state government agency. When I build my
asmx file it says no errors but it returns the error - Cannot serialize
interface ADODB.Recordset.
Here is my code:
[WebMethod(CacheDuration = 30,
Description="Accepts an Authorization in an ADOc recordset format. It
returns an xml data stream with the return status and other specified data.
The return table name is rtnRS.")]
public string SendAuth(Recordset rsAuthForm)
{
string xmlString = "";
string authString = "";
string rtnString = "";
OleDbDataAdapter da = new OleDbDataAdapter();
DataSet ds = new DataSet();
int intRowsRetrieved;
// read the recordset into the dataset
intRowsRetrieved = da.Fill(ds,rsAuthForm,"auth");
intRowsRetrieved = da.Fill(ds.Tables["auth"], rsAuthForm);
// create the fixed length string for the authorization header
authString = stringAuthHeader(ds);
... and so on
This is the only routine I use a recordset, all the others use a string
input and a string output. It was working great before implementing this part.
Thank you for you help,
James
Peter Bromberg said:
Recordset rs = new RecordsetClass();
rs.CursorLocation = CursorLocationEnum.adUseClient;
rs.Open(strSQL, strConn, CursorTypeEnum.adOpenStatic,
LockTypeEnum.adLockReadOnly, (int) CommandTypeEnum.adCmdText);
OleDbDataAdapter da = new OleDbDataAdapter();
DataSet ds = new DataSet();
int intRowsRetrieved;
intRowsRetrieved = da.Fill(ds, rs, "Customers");
intRowsRetrieved = da.Fill(ds.Tables["Customers"], rs);
--Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
:
I am writing a web service for a classic ASP application. I need to consume
an ADO recordset and then send it to another web service for processing. I
found an MSDN ariticle telling how to do this
(
http://msdn.microsoft.com/library/d.../html/cpconfillingdatasetwithadorecordset.asp),
one big problem - it says to import ADOComponent.dll and msado15.dll. I found
msado15.dll but I can't find ADOComponenet.dll, neither on my machine or to
download from the web. Does anyone have it???
Thank you!