p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP 3.0 (http://p2p.wrox.com/forumdisplay.php?f=27)
-   -   Database Query Question (http://p2p.wrox.com/showthread.php?t=13724)

kbuska June 3rd, 2004 09:59 AM

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>"

bmains June 3rd, 2004 11:16 AM


What specific error are you getting, and does it give you a line number?


kbuska June 3rd, 2004 12:06 PM

 The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.


Please try the following:

Open the <SITE> home page, and then look for links to the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.

HTTP 500 - Internal server error
Internet Explorer

Jonax June 3rd, 2004 01:19 PM

It could be the path to the typelib...

Zedman September 23rd, 2004 11:04 PM

Had same prob with Ch 15 example.
Was the Data Source code in the clssfd.asp file
Needed to contact ISP for path address.

All times are GMT -4. The time now is 06:20 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.