Work locally?

Discussion in 'ASP General' started by Aaron, Sep 12, 2003.

  1. Aaron

    Aaron Guest

    Hi,
    I have included the following code in my asp page. It seems to work
    fine on my localhost. However when i tried to access the page on other
    pc in the network, the page could not be displayed, with the error msg
    internal server error. Is it because the code that i added works only
    locally and not on a server?

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder("N:\Finance\Systems & Processes\S&P
    Projects\Proj Finance Intranet Project - Eric\testing\")
    Set fc = f.Files

    For Each f1 in fc
    set rs1 = Server.CreateObject("ADODB.recordset")
    rs1.Open "Select SectionCode from Dept", conn, adOpenStatic
    s = mid(f1.name,1,3)
    do until rs1.eof
    for each x in rs1.Fields
    q2= x.value

    If s = trim(q2) Then

    set rs2 = Server.CreateObject("ADODB.recordset")
    set rs3 = Server.CreateObject("ADODB.recordset")
    rs2.Open "Select Department from Dept where (SectionCode = " & q2
    & ")", conn, adOpenStatic
    rs3.Open "Select Division from Dept where (SectionCode = " & q2 &
    ")", conn, adOpenStatic

    Set fsoDepartment = CreateObject("Scripting.FileSystemObject")
    Set fsoDivision = CreateObject("Scripting.FileSystemObject")

    'check if the folder exist
    If fsoDepartment.FolderExists("N:\Finance\Systems &
    Processes\S&P Projects\Proj Finance Intranet Porject - Eric\"&
    rs2.fields(0).value ) Then

    If fsoDivision.FolderExists("N:\Finance\Systems &
    Processes\S&P Projects\Proj Finance Intranet Porject - Eric\"&
    rs2.fields(0).value & "\" & rs3.fields(0).value) Then
    response.write("Division folder already exist." &"<BR>")
    Else
    fsoDivision.CreateFolder("N:\Finance\Systems &
    Processes\S&P Projects\Proj Finance Intranet Porject - Eric\" &
    rs2.fields(0).value & "\" & rs3.fields(0).value)
    End If
    Aaron, Sep 12, 2003
    #1
    1. Advertising

  2. Aaron Bertrand [MVP], Sep 12, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. \Rob\
    Replies:
    4
    Views:
    3,493
    \Rob\
    May 12, 2004
  2. Charles M. Elias

    Why is this not a locally static choice?

    Charles M. Elias, Jun 26, 2003, in forum: VHDL
    Replies:
    2
    Views:
    1,495
    Charles M. Elias
    Jun 26, 2003
  3. jesse_j
    Replies:
    2
    Views:
    1,470
    jesse_j
    Dec 12, 2004
  4. John A Grandy

    work with HttpWebRequest locally

    John A Grandy, Aug 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    412
    Joerg Jooss
    Aug 26, 2004
  5. ConTactMe
    Replies:
    4
    Views:
    118
    ConTactMe
    Nov 10, 2003
Loading...

Share This Page