Work locally?

A

Aaron

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top