Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)
From: Manohar Kamath (mkamath_at_TAKETHISOUTkamath.com)
Date: 03/17/05
- Next message: Mark Schupp: "Re: Session cookies disappear!"
- Previous message: Curt_C [MVP]: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- In reply to: Adam Short: "Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Next in thread: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Reply: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Messages sorted by: [ date ] [ thread ]
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
>
>
============================================================================
======
>
>
- Next message: Mark Schupp: "Re: Session cookies disappear!"
- Previous message: Curt_C [MVP]: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- In reply to: Adam Short: "Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Next in thread: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Reply: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|