If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > IIS problem or what?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-19-04, 10:02
dove_g dove_g is offline
Registered User
 
Join Date: Jan 2004
Posts: 30
IIS problem or what?

On my computer I get filename and this work fine bu on server of my host I get null value :-(.

What's wrong, can my host setup this correctly or what?
Thank you.

Source:
<%
Set fso = CreateObject("Scripting.ileSystemObject")
Set folder = fso.GetFolder(Server.Mappath("\pictures\big"))
Set files = folder.Files

For Each file in Files
IF LEFT(rsArtikal.Fields.Item("Slika").Value, LEN(rsArtikal.Fields.Item("Slika").Value)-4) = LEFT(file.NAME,LEN(file.Name)-4) THEN%>
<a class="linkp" target="openNew" href="pictures\big<%=file.Name%>">Open additional picture</a>

<%
END IF
Next
Set files = folder.Files
et file = Nothing
Set fso = Nothing %>
Reply With Quote
  #2 (permalink)  
Old 04-19-04, 13:12
thele thele is offline
Registered User
 
Join Date: Jun 2003
Location: Ohio
Posts: 108
try change both values to uppercase before comparing them. The comparison that you are doing is case sensetive.

You can easily figure out if it is working by outputting both values to the screen to see if they are correct. If they are not correct, then there is your problem. If it is correct, then you problem lies elsewhere in your code.

Nothing more we can help you with now. It is all you.
Reply With Quote
  #3 (permalink)  
Old 04-19-04, 21:16
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
This won't help with your current problem, but might I suggest this change... instead of
Code:
For Each file in Files
IF LEFT(rsArtikal.Fields.Item("Slika").Value, LEN(rsArtikal.Fields.Item("Slika").Value)-4) = LEFT(file.NAME,LEN(file.Name)-4) THEN%>
<a class="linkp" target="openNew" href="pictures\big<%=file.Name%>">Open additional picture</a>

<%
END IF
Next
try...
Code:
recordName = LEFT(rsArtikal.Fields.Item("Slika").Value, LEN(rsArtikal.Fields.Item("Slika").Value)-4)
For Each file in Files
IF LEFT(recordName = LEFT(file.NAME,LEN(file.Name)-4) THEN%>
<a class="linkp" target="openNew" href="pictures\big<%=file.Name%>">Open additional picture</a>
<%
END IF
Next
or something close to that (haven't checked the syntax). Basically take that first left bit out of the file loop....
Reply With Quote
  #4 (permalink)  
Old 04-20-04, 02:29
dove_g dove_g is offline
Registered User
 
Join Date: Jan 2004
Posts: 30
No, the problem isn't in the code.

Simly on hosting server the code doesn't return value file.Name, I have try with

Response.Write(file.Name)

almost on every part of code :-(.
And on my computer works just fine.

Hm....
Reply With Quote
  #5 (permalink)  
Old 04-20-04, 02:37
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
I wasn't suggesting it was. You should read my reply, understand what it says and then reply....

The answer to your problem is (most likely) that you are running into a permissioning problem where the user that you are running IIS as does not have access to the correct files, or alternatively that functions such as Server.MapPath have not been enabled on the server or that parent paths have not been enabled on the server or something similar....

The reason I didn't give this answer is because it normally results in futher questions like "help, how do I check all of this" and I really don't have the time to go through it all.

The suggested code change below is to stop you constantly redoing a calculation that will not change during the process you have shown.
Reply With Quote
  #6 (permalink)  
Old 04-20-04, 03:15
dove_g dove_g is offline
Registered User
 
Join Date: Jan 2004
Posts: 30
Sorry Rockslide, I understand your previous answer and thank you for suggestion.

My reply was to thele, sorry one more time.
Thank you.

Last edited by dove_g; 04-20-04 at 03:17.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On