Displaying images to with ASP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sonia Scott
    New Member
    • Oct 2006
    • 4

    Displaying images to with ASP

    I have done the following code, which seem to partially work. I got my HTML ALT (text) from the database shown, but for some reason cannot display the image.

    Below is my connection code:

    <%
    Dim SurveyID
    SurveyID = request("Survey ID")
    set dbConnection = Server.CreateOb ject("ADODB.Con nection")
    fileType = "Driver={Micros oft Access Driver (*.mdb)};"
    fileLocation="D BQ=" & Server.MapPath( "PPPCdb/PPPC_Database.m db")
    myString = fileType & fileLocation
    call dbConnection.Op en(myString)
    sqlQuery="SELEC T * FROM [Question] WHERE Ques_SurveyID = '" & SurveyID & "'"
    set PPPCRecordset = Server.CreateOb ject("ADODB.Rec ordset")
    call PPPCRecordset.O pen(sqlQuery, dbConnection)
    %>

    My program name is PPPCSurvey4.asp
    The Field name for the image is - Ques_Picture
    The Field name for the ALT text is - Ques_Desc

    The code I am having problems with is below:

    <img src="PPPCdb/PPPC_Database.m db/<%= PPPCRecordset(" Ques_Picture")% >" width="561" height="436" alt="<%= PPPCRecordset ("Ques_Desc")%> ">

    Could someone explain why I am getting the following error, and how I could resolve it? I would really appreciate some help.

    Below is my error message:

    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:

    Click the Refresh button, or try again later.

    Open the localhost home page, and then look for links to the information you want.
    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services

    --------------------------------------------------------------------------------

    Technical Information (for support personnel)

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xf0c Thread 0x8b4 DBC 0xbbf8e4 Jet'.
    /PPPCWebsite/PPPCSurvey4.asp , line 12


    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)

    Page:
    GET /PPPCWebsite/PPPCSurvey4.asp

    Time:
    Saturday, October 07, 2006, 4:00:52 PM


    More information:
    Microsoft Support
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi there,

    Have created DSN connection on your web server? Kindly refer to below attached link for further reading & understanding, good luck & take care my fren.. :)

    Comment

    Working...