Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing data on the local machine

Status
Not open for further replies.

PetitPal

Programmer
May 2, 2001
243
GB
Just a quick question,

I want to write a component (in VB?) that can be run within a web browser but retrieves data from an access database held on the local machine; i.e.: the machine that is running the browser session, not the server that is providing the page.

I assume that this is possible but I just wondered if there is anything I need to take into account that is different from writing a normal component. Basically; any advice welcomed!

Thanks.

=)

PetitPal
 
You can retrieve data directly from an asp page, try looking into ado.

But if you want to build it as a component, then your best bet would be to write an ACTIVEX dll. This dll would have methods within it to retrieve the access database data and return the data either as an ado recordset/ html or some other structure you desire.

Compile the activex dll, register it on your web server (see regsvr32 documentation) and then invoke the objects from an asp page.
(server.createobject("com class string").

If your component returns HTML, you can simply write it out as

response.write objname.MethodisreturningHTML
If your component returns an ado recordset for example, your asp page would extract the data from the recordset and build its own html for display purposes.

Also, you could look into using xml and xslt for displaying the data.

Gilbert M. Vanegas
Programmer Analyst III
County of San Bernardino - ISD
Email : gvanegas@isd.sbcounty.gov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top