View Single Post
  #9 (permalink)  
Old July 24th, 2007, 07:49 AM
djgenesis djgenesis is offline
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is what I have .... but it is not printing at all ....

Can you help ?


Code:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<script type="text/javascript" src="Extras/CSJSRequestObject.js"></script>

<%
var sql = "bla bla bla......." ;
var odbc = Server.CreateObject("ADODB.Connection");
var dsn = "DSN=myDSN;UID=Myusername;PWD=Mypass";
var rst = Server.CreateObject("ADODB.Recordset");
odbc.open(dsn);
rst.open(sql,odbc);


if (rst.EOF) { rst.close;
                odbc.close;
               alert("There was no data matching your query")
              }
%>


<html>
<head><title>Daily Script Results</title></head>
<body>
<body bgcolor=lightblue>
Printing the results in the web page.

<table>
   <tr>
<% while (!rst.EOF)
                        {
                            Response.write("<tr>")        
                                    for (var d in Request.QueryString()) {


                                                document.write("<td>" + rst(d) + "</td>")


                                        }
                            Response.write("</tr>")            
                            rst.moveNext();
                            }
                            rst.close(); odbc.close(); %>  



                        <% for (var i in Request.QueryString()) {
                            if (typeof Request.QueryString(i) != "function") 
                                {                                  
                                    if ( Request.QueryString(i)==1) 
                                    {  
                                    document.write("<td>" + i + " </td>")
                                    }
                                }    

                            } %>
the Request.QueryString(i) is included in the other file.
Reply With Quote