Re: Using a COM to return data
From: Juan Alonso (jacinc2_at_hotmail.com)
Date: Mon, 14 Mar 2005 13:35:31 -0500
I think this might help you out.
If you are still having problems I can send you more pages with "HOW TO"
Thanks and I hope it helps.
"Debbie" <email@example.com> wrote in message
> Thanks - but how exactly do I do that?!
> I have seen several articles on the internet where the web designer is
> using code to create connection strings etc to access databases and
> tables, but I am not the one designing the ASP web pages and I wanted the
> web designer to call a method in my COM that would pull the necessary data
> out of various tables and pass the results back to the ASP page. I guess
> my main problem is I don't have any understanding of how the whole process
> works - I was hoping that the web designer could just create a instance of
> my COM, set its DataPath property and then call a method to gather the
> data like below:
> oCOM = Server.CreateObject("MyCOM.MyCOM")
> oCOM.DataPath = "c:\trackingmodule\data\"
> oTrackingData = oCOM.GetData()
> When you say "You can return the data as an ADO record set or XML", do you
> mean the web designer would include the relevant code in the ASP page, or
> do you mean I would actually write FoxPro code in my COM to do that? If
> its the latter, (1) how do I do that, and (2) is the data returned as a
> cursor or a table, and (3) who/how is the cursor or table closed.
> Sorry to sound so stupid!
> "Craig Berntson" <firstname.lastname@example.org> wrote in message
>> You can return the data as an ADO record set or XML.
>> Craig Berntson
>> MCSD, Visual FoxPro MVP
>> Salt Lake City Fox User Group
>> "Debbie" <email@example.com> wrote in message
>>>I have a simple COM that works with web pages that checks account
>>>information, returns prices for jobs and does other basic stuff.
>>>However, I now need the COM to be able to return data to an ASP page for
>>>tracking job status etc and I don't have a clue how best to do this. The
>>>only thing I can think of is to have the COM use an SQL to extract the
>>>information required, then copy it out to a throwaway table and pass the
>>>table name as a reference back to the ASP page so that web designer can
>>>code his/her page to pull everything out of that temp table and delete
>>>the table themselves when they're done. I'm sure this isn't the way to
>>>do it, but it's the only thing I can think of!
>>> Could anyone tell me how I should be handling this problem?
>>> Many thanks - Debbie