Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - What’s this error?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

What’s this error?

 Post Reply Post Reply
Author
no doubt View Drop Down
Groupie
Groupie


Joined: 28 February 2003
Location: Australia
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote no doubt Quote  Post ReplyReply Direct Link To This Post Topic: What’s this error?
    Posted: 16 March 2003 at 12:10am
 Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'Server.MapPath'

/deadwoodforum/forum/admin/common.asp, line 95

thanks

 

Back to Top
Dural View Drop Down
Newbie
Newbie


Joined: 15 March 2003
Location: Canada
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dural Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2003 at 6:16am

This is an example found here:

http://www.w3schools.com

set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("northwind.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select * from Customers", conn


The following information was found here:

http://www.4guysfromrolla.com/webtech/121799-1.shtml

For example, if you had an ASP script running in the /Inc directory, which had the physical path C:\InetPub\wwwroot\Inc, the following two lines:

Response.Write Server.MapPath("somefile.txt") & "<BR>"
Response.Write Server.MapPath("/somefile.txt") 


Would produce different output. The first line would use the current directory's physical path as the path for somefile.txt, and would output C:\InetPub\wwwroot\Inc\somefile.txt. The second line of code, due to the beginning forward slash, would use the root physical path, producing C:\InetPub\wwwroot\somefile.txt as the output.

Back to Top
no doubt View Drop Down
Groupie
Groupie


Joined: 28 February 2003
Location: Australia
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote no doubt Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2003 at 12:08am
that doesnt really tell me what to do......
Back to Top
zhaph View Drop Down
Newbie
Newbie


Joined: 05 March 2003
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote zhaph Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2003 at 8:30am
Have you moved your database from it's default location (like you're supposed to for security)?

If so, you should have updated both:
common.asp in the root of the forum, and the common.asp file in the admin folder.

Make sure that line 95 of /admin/common.asp either looks similar to line 165 of /common.asp or atleast refers to the same location.

It should look something like this:

strDbPathAndName = Server.MapPath("database/wwForum.mdb")

What I think you have is:
strDbPathAndName = Server.MapPath()

hth
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.