View Single Post
  #1 (permalink)  
Old June 3rd, 2004, 09:59 AM
kbuska kbuska is offline
Registered User
Join Date: Jun 2004
Location: Rexburg, Id, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kbuska
Default Database Query Question

I'm having issues with this Script. It works great on my machine connecting to a third party SQL hosting service but once I upload it to my Web Hosting service it no longer works. The Web Hosting service says it is something in this script. Any Ideas? I basically got this script from my WROX Beginning ASP 3.0 Book.

Ken Buska

    Option Explicit

<Title>Email Offers Query</Title>
<link href="../global.css" rel="stylesheet" type="text/css">

    dim adOpenForwardOnly, adLockReadOnly, adCmdTable, strConnect, objConn, objRS, strQuerystring

    strQuerystring = Request.QueryString("user")
    adOpenForwardOnly = 0
    adLockReadOnly = 1
    adCmdTable = 2

    strConnect = "Provider=sqloledb;" & _
                    "Data Source=<ServerName>;" & _
                    "Initial Catalog=db1559;" & _
                    "User Id=dba1559;" & _

    Set objConn = Server.CreateObject("ADODB.Connection")
    Set objRS = Server.CreateObject("ADODB.RecordSet")

    objConn.Open strConnect

    objRS.Open "Email_Offers", objConn, adOpenForwardOnly, adLockReadOnly, adCmdTable
<table "border=1"><tr><td class="survey">Email Address</td><td class="survey">Date & Time Submitted</td></tr>
    While Not objRS.EOF
        Response.Write "<TR><TD class=selectviewtext><a href=mailto:" & objRS("Email_Address") & ">" & objRS("Email_Address") & "</a></TD><TD class=selectviewtext>" & objRS("Date_Time") & "</TD></TR>"