StarQuest Technical Documents

Sample ASP Script for use with Microsoft IIS

Last Update: 16 October 2008
Product: StarSQL
Versions: 5.x
Article ID: SQV00SQ043


The sample ASP script that shows you how to connect to your DB2 with StarSQL.



<TITLE>StarQuest ASP Sample</TITLE>

Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Conn.Execute("SELECT * from PROD.INVOICE")



<!--Create the header rows-->

<% For i = 0 to RS.Fields.Count - 1 %>
<% =RS(i).Name %>
<% Next %>


<!--Get all the data and close the connection-->


<!--Loop through the data and display-->

<% For row = 0 to UBound(v,2) %>

<% For col = 0 to UBound(v,1) %>
<% = v(col,row) %>
<% Next %>

<% Next %>



The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.