Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)

From: Manohar Kamath (mkamath_at_TAKETHISOUTkamath.com)
Date: 03/17/05


Date: Thu, 17 Mar 2005 09:59:31 -0600

The DataSet and RecordSet objects are not compatible -- Dataset represents a
whole database (including tables, relations, etc.), while the recordset
represents two-dimensional view of data (Table, view, result from stored
proc, etc)

In my opinion, you need to architect your solution better. You could return
a recordset object from the webservice, or a two-dimensional array.

-- 
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Adam Short" <adam@phuture-uk.net> wrote in message
news:ObPbSewKFHA.3340@TK2MSFTNGP14.phx.gbl...
> I am trying to write a routine that will connect a .NET server with a
> classic ASP server.
>
> I know the following code doesn't work!   The data is being returned as a
> dataset, however ASP does not recognise datasets and requires a recordset.
> Can the datatypes be converted?  At the Classic ASP end or .NET end?  Can
> SOAP toolkit provide the conversion, can any toolkit provide a conversion?
>
>
============================================================================
======
>
> Web Service Code :
> ---------------------
>
>   dim strSelect as string
>   dim srcData as ODBCconnection
>   dim fltData as ODBCdataAdapter
>   dim myPath as String
>
>   myPath = me.Context.Request.ServerVariables("APPL_PHYSICAL_PATH")
>
>
>   dim rtnData as DataSet
>
>   strSelect = "SELECT * FROM myDataSource"
>
> '  srcData = new ODBCConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
> SOURCE=" & myPath & "..\data\myDataSource.mdb" )
>
>   srcData = new ODBCConnection( "DSN=MyDataSource;uid=;pwd=" )
>
>   fltData = new ODBCdataAdapter( strSelect, srcData )
>
>   rtnData = new dataset
>
>   fltData.fill( rtnData )
>
>   return rtnData
>
>
============================================================================
======
>
> ASP Web Server Code:
> -------------------------
>
>    SET objSoapClient = Server.CreateObject("MSSOAP.SoapClient")
>
>
>    ' needs to be updated with the url of your Web Service WSDL and is
>    ' followed by the Web Service name
>
>    objSoapClient.ClientProperty("ServerHTTPRequest") = True
>
>    Call
>
objSoapClient.mssoapinit("http://system.evolucion.co.uk/evolucion-services.a
smx?WSDL")
>
>    set RecordSet = Server.CreateObject("ADODB.Recordset")
>
>    ' use the SOAP object to call the Web Method Required
>    RecordSet = objSoapClient.getEvolucionVersionList()
>
>    strOutput = strOutput & "<P>On-Line Result : " & RecordSet.RecordCount
>
>
============================================================================
======
>
>


Relevant Pages

  • Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)
    ... > whole database, while the recordset ... > a recordset object from the webservice, ... >> dim srcData as ODBCconnection ... >> ' needs to be updated with the url of your Web Service WSDL and is ...
    (microsoft.public.inetserver.asp.general)
  • Re: access 2003
    ... Dim ctl As Control ... Dim rs As Recordset ... This sets the query definitions for choosing data to create an invoice using ... Event on combo box: Private Sub ChooseCust_AfterUpdate ...
    (microsoft.public.access.conversion)
  • Re: A simple problem with MoveFirst
    ... update the table (rather than using the recordset) means that from ADO's ... Dim tbDataToBeEmailed As ADODB.Recordset ... tbDataToBeEmailed.Open "tbDataToBeEmailed", cnCurrent, adOpenKeyset, ... "You have not entered time into the ACIS ...
    (microsoft.public.access.modulesdaovba)
  • Re: macro error due to editor
    ... Your VBA code never sets DB or the Recordset variables to Nothing. ... Do you declare DB as a global variable anywhere in the database file (e.g., ... EmpDateAs String ... Dim DB As Database, Qry As QueryDef, Qry_def As String ...
    (microsoft.public.access.macros)
  • Re: DAO MUCH faster than ADO in this test
    ... DAO is well-known to be faster than ADO. ... Of course the DAO loop ran faster than the SQL loop; ... advantage of a table-type recordset, which only works on local tables. ... Dim starttime As Single, finishtime As Single ...
    (microsoft.public.access.modulesdaovba)