Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > BOOK: Beginning ASP 3.0
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 25th, 2003, 12:13 PM
Registered User
 
Join Date: Aug 2003
Location: Lawrenceville, GA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 10 Enhanced File Info Display exercise err

I get an error of "expect statement" when trying to load the Enhanced File Info Display exercise code from Chapter 10 on pg 400. Any guidance you may be able to give would be greatly appreciated.

John
  #2 (permalink)  
Old August 25th, 2003, 02:59 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi John,

Can you post the offending code? I don't have the book here so it's hard to guess what the problem is (other then suggesting that you should "add a statement" somewhere ;) )

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #3 (permalink)  
Old August 25th, 2003, 03:07 PM
Registered User
 
Join Date: Aug 2003
Location: Lawrenceville, GA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the code, filedetails.asp, of the exercise and below it the code which is needed for it to work.

<%Option Explicit%>

<%
    Dim strFDPathInfo, strFDPhysicalPath
    strFDPathInfo = Request.ServerVariables("PATH_INFO")
    strFDPhysicalPath = Sever.MapPath(strFDPathInfo)
    Dim objFDFSO, objFDFile
    Set objFDFSO = CreateOject("Scripting.FileSystemObject")
    Set objFDFile = objFDFSO.GetFile(strFDPhysicalPath)
%>

<P>

<DIV STYLE= "font-size:11; font-family: Verdana; ">
File Name: <B><%= strFDFile.Name &></B><BR>
Server Path: <B><%= strFDPathInfo %></B><BR>
Physical Path: <B><%= objFDFile.Path %></B><BR>
File Size: <B><%= objFDFile.size %></B><BR>
Date Created: <B><%= objFDFile.DateCreated %></B><BR>
Date Last Mofdified: <B><%= objFDFile.DateLastMofdified %></B><BR>
Date Last Accessed: <B><%= objFDFile.DateLastAccessed %></B><BR>
</DIV>

this is the file which has the include statement which refers to the code above.

John
  #4 (permalink)  
Old August 25th, 2003, 03:26 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi John,

Is this the source from the book?? If not, you have a serious typing problem..... ;)

1. Sever should be Server
2. CreateOject should be CreateObject
3. The &> should be %>
4. You define objFDFile as a reference to a file, and then try to use strFDFile to write out its name.
5. DateLastMofdified should be DateLastModified

If this code isn't directly from the book (which I can hardly imagine) did you at least spend 1 or 2 seconds trying to find out the errors yourself, or did you start posting to this forum right away????


Imar



---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #5 (permalink)  
Old August 26th, 2003, 12:07 PM
Registered User
 
Join Date: Aug 2003
Location: Lawrenceville, GA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much for pointing out the type-o's. I had checked the file that I downloaded for Wrox download site and had gotten the same message of "Expected statement", so I had not throughly check the code I had entered for type-o's. I have corrected my type-o's and still am getting the above error message. FYI, I have spent several hours trying to find out why I am getting this message. I have done searches on the net to try to find more info about the message in hope of finding out what it is referring to without success. If you have any insight as to what the error is referring to I would appreciate any info you may have.

For your future consideration, I would like to suggest you check out all the facts before you make assumptions, because you probably are well aware of what assume means.

John
  #6 (permalink)  
Old August 26th, 2003, 02:02 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Well, excuse me..... Isn't inquiring (see second quote) not part of checking out all the facts?????

Imar


Quote:
quote:For your future consideration, I would like to suggest you check out all the facts before you make assumptions, because you probably are well aware of what assume means.

Quote:
quote:If this code isn't directly from the book (which I can hardly imagine) did you at least spend 1 or 2 seconds trying to find out the errors yourself, or did you start posting to this forum right away????
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #7 (permalink)  
Old August 27th, 2003, 03:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Are you sure you corrected all the typos? I pasted that bit of code into an ASP page, changed the typos, and it worked just fine.

FYI, the "expected statement" error message is just a variation on "syntax error", it just means that asp doesn't understand the code you've written.

If you still can't get it to work, post the whole page here (I don't have the book either) and we'll get to the bottom of it.

BTW you can't blame Imar for his response, those typos were shouting at you!

hth
Phil
  #8 (permalink)  
Old August 27th, 2003, 09:48 AM
Registered User
 
Join Date: Aug 2003
Location: Lawrenceville, GA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the problem after absolutely verifying that there were no type-o's, I even replaced the code from wrox's file and still got the error. It was the file, it must have gotten corrupted somehow, i.e. bad spot on the disk or something. When I deleted my original file, which contained the copied code and was still failing, and replaced it with a copy of the wrox file it worked.

Thanks for letting me know what the Expected statement message was indicating.

John
  #9 (permalink)  
Old August 27th, 2003, 10:35 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Thank you. That's what I thought too. I am more than willing to help and I am usually friendly while doing that, but if things are too obvious I wonder whether people just take these lists as easy problem solvers without the need to think for themselves.

John, the fact that "hours have been spent" searching for a solution wasn't obvious from the first post, so I easily put you in the "lazy category" for the obvious reasons. Judged too soon. My bad. Sorry.

Imar


Quote:
quote:BTW you can't blame Imar for his response, those typos were shouting at you!
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 Exercise 2 diango BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 February 1st, 2011 03:24 PM
chapter 3 exercise 4 walkamongus BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 0 September 10th, 2007 09:34 PM
Chapter 5 - Exercise 1 scgtman BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 May 16th, 2006 08:10 PM
display an image (more info) gorney .NET Web Services 0 December 29th, 2003 02:32 PM



All times are GMT -4. The time now is 02:27 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.