com and asp 
Author Message
 com and asp

we have built vb com dlls that access a database. we want to return the
results of this access to an asp page. in order to do this the results must
be returned from the dll to the asp page as a variant. to achieve this,
within the dll we are returning the results from the db call to an array
which is then assigned to a variant as a return parameter. is there a more
efficient way of doing this.

thanks,

Grainne



Mon, 25 Aug 2003 18:50:02 GMT  
 com and asp
That method is OK but it only needs to be a variant if it is a ByRef
parameter.  You can still call

public Function (ByVal ID as long) as ADODB.Recordset

from ASP.  Passing back a disconnected recordset rather than an array makes
for easier manipulation of the data.


Quote:

> we have built vb com dlls that access a database. we want to return the
> results of this access to an asp page. in order to do this the results
must
> be returned from the dll to the asp page as a variant. to achieve this,
> within the dll we are returning the results from the db call to an array
> which is then assigned to a variant as a return parameter. is there a more
> efficient way of doing this.

> thanks,

> Grainne



Mon, 25 Aug 2003 19:19:31 GMT  
 com and asp
In addition to using an ADODB.Recordset to pass back data,
the recordset object also supports a method of persisting the data via XML.

rs.Save XMLStream, adPersistAsXML (Something like that)

There is alot of information on MSDN concerning this. Overall, I found that it is
very efficient. What happens is you actually pass just a string that contains an
XML Document. From there you can use the ASP.Response object to build that
hierarchy or even recordset object.

Hope this helps,

Ed.

Quote:
-----Original Message-----
That method is OK but it only needs to be a variant if it is a ByRef
parameter.  You can still call

public Function (ByVal ID as long) as ADODB.Recordset

from ASP.  Passing back a disconnected recordset rather than an array makes
for easier manipulation of the data.



> we have built vb com dlls that access a database. we want to return the
> results of this access to an asp page. in order to do this the results
must
> be returned from the dll to the asp page as a variant. to achieve this,
> within the dll we are returning the results from the db call to an array
> which is then assigned to a variant as a return parameter. is there a more
> efficient way of doing this.

> thanks,

> Grainne

.



Tue, 26 Aug 2003 05:35:56 GMT  
 com and asp
In addition to using an ADODB.Recordset to pass back data,
the recordset object also supports a method of persisting the data via XML.

rs.Save XMLStream, adPersistAsXML (Something like that)

There is alot of information on MSDN concerning this. Overall, I found that it is
very efficient. What happens is you actually pass just a string that contains an
XML Document. From there you can use the ASP.Response object to build that
hierarchy or even recordset object.

Hope this helps,

Ed.

Quote:
-----Original Message-----
That method is OK but it only needs to be a variant if it is a ByRef
parameter.  You can still call

public Function (ByVal ID as long) as ADODB.Recordset

from ASP.  Passing back a disconnected recordset rather than an array makes
for easier manipulation of the data.



> we have built vb com dlls that access a database. we want to return the
> results of this access to an asp page. in order to do this the results
must
> be returned from the dll to the asp page as a variant. to achieve this,
> within the dll we are returning the results from the db call to an array
> which is then assigned to a variant as a return parameter. is there a more
> efficient way of doing this.

> thanks,

> Grainne

.



Tue, 26 Aug 2003 05:36:05 GMT  
 com and asp

Quote:
> What happens is you actually pass just a string that contains an
> XML Document. From there you can use the ASP.Response object to build that
> hierarchy or even recordset object.

If you are using XML then it is normally better to pass it as a string then
load it into whatever object gives you the DOM.  Passing strings is better
than passing objects that simply contain the same information.


Tue, 26 Aug 2003 17:52:46 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. COM forn ASP under IIS 5.0

2. com and asp.

3. COM with ASP

4. Passing objects between COM and ASP

5. error to call com from ASP?!!!

6. NEWBIE: COM and ASP

7. Error handling between COM and ASP

8. Debugging COM with ASP

9. Consts global (in Com and ASP)

10. COM vs ASP

11. how to make VB COM for ASP application

12. Pb with COM and ASP !!!

 

 
Powered by phpBB® Forum Software