Print Page | Close Window

What’s this error?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=1053
Printed Date: 29 March 2026 at 8:18pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: What’s this error?
Posted By: no doubt
Subject: What’s this error?
Date 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

 




Replies:
Posted By: Dural
Date Posted: 16 March 2003 at 6:16am

This is an example found here:

http://www.w3schools.com - 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 - 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.



-------------
Bastard Operator from Hell


Posted By: no doubt
Date Posted: 17 March 2003 at 12:08am
that doesnt really tell me what to do......


Posted By: zhaph
Date 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

-------------
zhaph



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net