Results 1 to 2 of 2

Thread: [2005] Server Path of the database

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    150

    [2005] Server Path of the database

    The web hosting company asked me to save my database in this folder:

    /USER/DB


    How do I change this line :

    Code:
    <asp:AccessDataSource ID="AccessDataSource1"  runat="server" DataFile="~/App_Data/mydatabase.mdb"

    They told my I can save my html or aspx files in this directory


    /USER/WWWROOT


    Now my website doesn't work because I have to change my database path to point directly to the /USER/DB , I tried to modify it like this ,


    Code:
    <asp:AccessDataSource ID="AccessDataSource1"  runat="server" DataFile="../DB/mydatabase.mdb"

    but it didn't work !

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Server Path of the database

    Modify your AccessDataSource object's DataFile property in the codebehind, where you can use Server.MapPath("../DB/mydatabase.mdb")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width