Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: Nobody answered my questions?--Thanks!


Message #1 by "Wang, Julia" <Julia.Wang@R...> on Thu, 8 Nov 2001 09:16:32 -0600
Hi,



First of all, I am sorry for getting you all back late, but I was out of

office wednesday.



Thank you all so much for trying to help. I really appreciate it. 



This seems to hit the point. I need to figure out if the scripting software

is up there on the server. Secondly, too bad I haven't come to the "MapPath"

section yet. I need to finish reading the book to learn its context.

Besides, I need to find out is the "Application" is created for global.asa

on the server side (main server on campus). What is "\Inetpub\... anyway?



Thank you! Thank you! Thank you! for all you kindness!



Julia









-----Original Message-----

From: Kyle Burns [mailto:kburns@c...]

Sent: Wednesday, November 07, 2001 12:25 PM

To: ASP Databases

Subject: [asp_databases] Re: Nobody answered my questions?--Repost que

stions





The Scripting runtime needs the PHYSICAL path to the folder in order to find

it.  Because your web site doesn't necessarily have to reside in

C:\INetPub\WWWRoot, your best bet will be to retrieve the location of the

folder that you are looking for by using the Server.MapPath() function.



=================================

Kyle M. Burns, MCSD, MCT

ECommerce Technology Manager

Centra Credit Union

kburns@c...



 



-----Original Message-----

From: Wang, Julia [mailto:Julia.Wang@R...]

Sent: Tuesday, November 06, 2001 3:36 PM

To: ASP Databases

Subject: [asp_databases] Re: Nobody answered my questions?--Repost

questions





Sure! Thanks, Mark for responding!



First of all, is "Set myFSO 

Server.CreateObject("Scripting.FileSystemObject") right? I noticed in ASP

3.0(Wrox), it is writen: Set myFSO 

CreateObject("Scripting.FileSystemObject").



Secondly, any instructions on how to find out the directory to the folders

("asp1" in my case) or files? I have part of the code like the following but

it won't work. (I am using WINNT and my server is on the WebServer in

another place.)



I have a script like the following. With "Server.CreateObject...", when I

ran the web page, it says"CreateObject failed", then I left out the

"Server." using "Set myFSO = CreateObject("Scripting.FileSystemObject")"

instead, then it tells me "Path Not Found."



I am new to ASP. I really need some guidance.



<%

Dim myFSO, myFolder, myFile, FormFold

FormFold = Request.Form("folder")

Set myFSO = CreateObject("Scripting.FileSystemObject")

Set myFolder = myFSO.GetFolder("\\Webserver\Personal Web\WangJ\asp1" &

FormFold)

Response.Write "The files in" & myFolder.Name & " are:"

%>

<table border="1">

<tr>

<td><b>Name</b></td>

<td><b>Size</b></td>

<td><b>Type</b></td>

<td><b>Modified</b></td>

</tr>



*******************



Next question is:



I was practicing the excercise files I got from the training class. It was

ok at the class but now every time I tried to open it up from the "asp1"

folder, it just won't open. And the asp file which is supposed to use this

global.asa file is not working properly as well. I checked the code, there

is nothing wrong with it(it is typed up on the disk for training purpose,

and all I did just typed in the two lines of asp in the "user.asp" file

according to the book and run the script.) Could you check them both for me?

Thanks so much.



1."global.asa": (Strange, I was just able to open it up from Window

Explorer)



<SCRIPT LANGUAGE="VBScript" RUNAT="Server">



SUB Application_OnStart

  Application("visits") = 0

  Application("active") = 0

END SUB



SUB Application_OnEnd



END SUB



SUB Session_OnStart

  Session.Timeout = 1

  Application.Lock

    Application("visits") = Application("visits") + 1

  Application.Unlock



  Application.Lock

    Application("active") = Application("active") + 1

  Application.Unlock

END SUB



SUB Session_OnEnd

  Application.Lock

    Application("active") = Application("active") - 1

  Application.Unlock

END SUB



</SCRIPT>



2."user.asp": (This file is not counting the number of visits as it supposes

to when open up in browser)



<%@ LANGUAGE = "VBSCRIPT" %>

<% OPTION EXPLICIT %>



<html>

<title>Template</title>

<head>

<link rel="stylesheet" type="text/css" href="mystyles.css">

</head>



<body>



<div align="center">

<table width="600">

<tr>

<!-- #INCLUDE FILE = "header.asp" -->

</tr>

<tr>

<td valign="top">

<!-- #INCLUDE FILE = "inc/navigate.asp" -->

</td>

<td width="450" valign="top">



<!-- INSERT HERE -->



<p>This site has had <b><% = Application("visits") %></b>total visits</p>

<p>There are <b><%=Application("active")%></b>active visitors.</p>



</td>

</tr>



<!-- #INCLUDE FILE = "inc/footer.asp" -->



</table>

</div>



</body>

</html>



Please help me solve this problem!! Thanks!!

Julia 



<*><*><*><*><*><*><*><*><*><*>

Julia Wang

Acquisition/Serials Librarian

Greenlease Library

Rockhurst University

1100 Rockhurst Rd.

Kansas City, MO 64110

Tel:  xxx-xxx-xxxx  

Fax:  xxx-xxx-xxxx





-----Original Message-----

From: Mark Eckeard [mailto:meckeard2000@y...]

Sent: Tuesday, November 06, 2001 1:15 PM

To: ASP Databases

Subject: [asp_databases] Re: Nobody answered my questions?





Julia,



Re-post the questions.  Maybe I can help.



Mark

--- "Wang, Julia" <Julia.Wang@R...> wrote:

>  

>  

> I am so disappointed that so far nobody has helped

> me by answering the two

> questions I posted last Friday. I am so anxious to

> figure out the problem so

> that I can move on. Now I am stuck. Are they too

> dumn questions? Can anyone

> point me what should I learn first of all to know

> how to find my web

> directory?  

>  

> Too bad, nobody around my work place knows ASP. I do

> have both ASP 2.0 and

> 3.0 version (Wrox) and they do helped a lot in some

> area (such as what is

> asp, etc.), but I still have problems that the book

> won't answer for me. 

>  

> Thanks!

>  

> Julia

> 

> 

>  



> meckeard2000@y...


> $subst('Email.Unsub')

> 

> 





__________________________________________________

Do You Yahoo!?

Find a job, post your resume.

http://careers.yahoo.com



 




$subst('Email.Unsub')



 




$subst('Email.Unsub')



 




$subst('Email.Unsub')


  Return to Index