Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    Hi,
    This is what I get after moving the files of a script to another:
    Code:
    Microsoft VBScript runtime error '800a01c2' 
    
    Wrong number of arguments or invalid property assignment: 'Server.MapPath' 
    
    /mydomain.com/IssueManager/Common.asp, line 20
    It should work like on the other server, because the database is a file (mdb), but I get this error. I suppose it's due to the new server's config, but can anyone point out what to do to fix it?
    BTW- The line 20 of Common.asp contains:
    Code:
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & Server.MapPath() & "\database.mdb" & ";Persist Security Info=False"
    Thanks a lot

  2.  

  3. #2
    ACW
    ACW is offline
    Member
    Join Date
    Jul 2004
    Posts
    82
    Member #
    6554
    The following should work if the database in the root...
    Code:
    Server.MapPath(Request.ServerVariables("Script_Name"))
    If it is not in the root of the site, you will need to append the folder name like so...
    Code:
    Server.MapPath(Request.ServerVariables("Script_Name")) & "\mydatabasefolder\database.mdb"
    Affordable Business Web Site Hosting by Geo Redundant Hosting

  4. #3
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    That fixed it, thanks


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:45 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com