SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Location
    bangalore
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    path not found problem in uploaded website

    hai all
    i have uploaded my website,the problem is
    in one page i got error as follows

    Microsoft VBScript runtime error '800a004c'

    Path not found

    /heading.asp, line 84


    code is follows
    please help me to resolve it
    Code:
    <%DIM my_SQL4, objRS4
    my_SQL4 = "SELECT  heading_report FROM [report]"
    Set objrS4 = Server.CreateObject("ADODB.Recordset")
    objrs4.open my_sql4,objconn,3,3
    DIM my_SQL5, objRS5
    my_SQL5 = "SELECT  heading_report FROM [report]"
    Set objrS5 = Server.CreateObject("ADODB.Recordset")
    objrs5.open my_sql5,objconn,3,3
        folder="http://localhost/www.hermitageresearch.com/pdf"
             set fso = CreateObject("Scripting.fileSystemObject") 
        set fold = fso.getFolder(folder) 
        filecount=fold.files.count
        for each file in fold.files 
       response.write"<a target=_blank href=""http://www.hermitageresearch.com/localhost/pdf/"&file.name&""">" &file.name& "</a>" &"<br>"%>
         <hr align="left" size="1" color="#808080" noshade>
       <% next 
        set fold = nothing: 
        set fso = nothing %>
    thanks in advance

    sona

  2. #2
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The FileSystemObject works locally and therefore needs local paths on your server. Your folder variable should look like:

    Code:
    folder = "c:\inetpub\wwwroot\pdf"
    or whatever the physical path to the pdf folder is.

  3. #3
    SitePoint Guru SSJ's Avatar
    Join Date
    Jan 2007
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Sona,
    Use following and let me know if it is working..

    Code:
    <%
    DIM my_SQL4, objRS4
    my_SQL4 = "SELECT  heading_report FROM [report]"
    Set objrS4 = Server.CreateObject("ADODB.Recordset")
    objrs4.open my_sql4,objconn,3,3
    DIM my_SQL5, objRS5
    my_SQL5 = "SELECT  heading_report FROM [report]"
    Set objrS5 = Server.CreateObject("ADODB.Recordset")
    objrs5.open my_sql5,objconn,3,3
        folder=Server.MapPath("/pdf/")
             set fso = CreateObject("Scripting.fileSystemObject") 
        set fold = fso.getFolder(folder) 
        filecount=fold.files.count
        for each file in fold.files 
       response.write"<a target=_blank href=""http://www.hermitageresearch.com/localhost/pdf/"&file.name&""">" &file.name& "</a>" &"<br>"%>
         <hr align="left" size="1" color="#808080" noshade>
       <% next 
        set fold = nothing: 
        set fso = nothing 
    	%>

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Location
    bangalore
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hai

    I got output
    I used ur code SSJ
    thanks its working fine
    I need one more help
    From the same folder file has to be displayed
    i need to add two features to the manner of display
    1. i have to arrange the files by created date desc
    2.paging should add to that file names

    since we will update more reports every week so number of files will be more i need to control files per page
    could anybody give the tips to go for or any linksa are available

    thanks in advance
    sona

  5. #5
    SitePoint Guru SSJ's Avatar
    Join Date
    Jan 2007
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For Paging,
    You can refer following link.
    http://www.asp101.com/samples/db_paging.asp

  6. #6
    SitePoint Guru SSJ's Avatar
    Join Date
    Jan 2007
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For Sorting,
    You can refer following link.
    http://www.sitepoint.com/forums/showthread.php?t=464308


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •