dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Advanced
Mar 23, 2000

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Use the VB Response Object to Generate Dynamic HTML Pages

I researched Windows Script Components (WSC) and was interested in their capability to integrate with ASP. I tried integrating a VB DLL with ASP. I included a reference to the Microsoft Active Server Pages Object Library (ASP.dll) in the DLL and used the Response object to write my HTML. I was surprised to find it worked when I tested it. It meant I could create a DLL that had common reusable routines for creating lists and filling combo boxes. The possibilities are endless, all in compiled VB DLL code.

The DLL has a method called ShowRecordSet that has four parameters:
  • StrConnectString (the database connect string)
  • StrSQL (the SQL command to execute)
  • StrHeading (a heading for the table)
  • ASP Response (the reference to the Response object of the ASP page)
The DLL connects to the database, executes the query, and writes out an HTML table with a header and detail line for each row in the recordset. Use this DLL CRShtml class code:
 
Option Explicit
'Color constants
Const PageBgColor As String = 
Brian Barnett
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date