MS Access Database - First Attempts -Newbie

Discussion in 'Databases' started by Miro, Apr 8, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,
    I am extremely new to asp.net and this is my first couple tries attempting to post the web to my discountasp.net hosting account. I am not exactly sure what "keywords" to search for or what to read up on to set this up on discountasp.net

    If someone can lead me to the correct thread or faq or how to set this up.

    In my vs2008 pro, i created an aspx website.
    Then I created an _database folder within my website. Added an access table.

    Dragged and dropped the datagrid to the web, connected to my datafile.
    -Compile - run - all works great.

    I cannot figure out a proper way to deploy this online.
    I know how to to ftp to my folder but here are my questions:

    my vs2008 structure would look something like this
    <Project>
    ...-_Database folder
    ......-mdbTest.mdb
    ...-default.aspx
    ...-web.config

    I have not edited anything in my web.config file. Everything was done through a drag and drop so far.

    I do see this within my default.aspx
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/_database/mdbTest.mdb"
    OldValuesParameterFormatString="original_{0}"
    SelectCommand="SELECT [UserID], [EmailAddr] FROM [Users]">
    </asp:AccessDataSource>

    so lets say I go to my www.discountasp.net account and i create a subfolder called deploytest. So now my discountasp.net account structure looks something like this

    <myroot>
    ...-_Database Folder
    ......-mdbTest.mdb
    ...-DeployTest Folder
    ......-default.aspx
    ......-web.config

    What do I need to change / where do I need to change so I can load up my deploytest website and read the mdb file.
    As well, what should I change for my <asp:AccessDataSource so I can add a ?connection string? within my web.config file so I can make switch it very simply by editing the web.config file when I ftp my site over.
    What should this be in the web.config file / in the source html.

    Sorry for all the questions...I am just lost a bit at what to read / where to look as it works fine on my local site.

    Thanks,

    Miro
     
  2. Hi,
    Are you going to keep using the conn string in the pages rather than the web.config?
    For Access DBs and ASP.NET it is a lot easier, I think anyway.
    As for any problems, keep in mind the tilde character is specifying the site root.
    You can at times do better on the live server to test with and without root directives.
    That is just a tip for testing, another is to test with a specific folder then once it is working move your Access DB to the protected _database folder.
    May seem crazy but those two tips can help with some frustration.
    Salute,
    Mark
     
  3. Thank you...
    that got me started in teh right direction and I am able to access my database in any folder (started by putting it right with the default.aspx)...
    then I changed to be the _database file and it worked after a couple attempts.

    Many thanks.

    1 quick side questions if possible.

    1. When specifying the path for the _database file...do you use your e:\blablabl\balblbal given in your discountasp.net account or do you use the regular ~/ ? ( whats common practice )


    Thank you for getting me started.

    Miro
     
  4. Hi,
    Give me a few days to experiment.
    On DASP servers I use an IIS6 server for Access DB tests but only for Classic ASP.
    Most of the requests I get for Access for from Dreamweaver users here.
    Salute,
    Mark
     
  5. No worries,

    I got a discountasp.net account to play with and learn asp.net
    I find that posting to a "hosting server" than actaully just running something 'locally' is necessary to learn all the quirks about 'going live'.

    I will slowly truck along by trial and error.

    But I am interested to see what is the 'norm' when it comes to specifying the path for a hosting site like this.

    Thank you for your help.

    Miro
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page