C#/ASP.net website using an Access database (what is the Data Source = to?)

Discussion in 'Databases' started by Takeshi Eto, Jan 4, 2006.

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

    Takeshi Eto DiscountASP.NET Staff

    Look in the Account Information section of your control panel for the path to the root of your website.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
  2. THANK YOU THANK YOU THANK YOU!!!!! I'm new at this and I have been chasing my tail for THREE DAYS!!! It works perfectly!!
     
  3. I have a web written in C# and ASP.net that uses an Access database. My last host gave me the line of code necessary to use the database. I haven't been able to get DiscountASP.net to provide me with the code, and I was hoping someone else might have had the same problem and knows what to type. Below is the code that I am trying to fix. Line 8 is what I use for my localhost, but it's commented out and not the problem. Line 10 is the active line of code. I think that I just have to type something different to the right of Data Source=' but I've tried everything that I can think of and nothing has worked yet. Anyone who can figure this out has my eternal thanks!!!

    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0118: 'System.Web.UI.Page.Server' denotes a 'property' where a 'class' was expected

    Source Error:

    Line 8: // OleDbConnection objConn = new OleDbConnection('Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\\Inetpub\\wwwroot\\KsPracticeWeb\\GabriellesStore\\EditStoreFilesHere\\GsStores.mdb');
    Line 9:
    Line 10: OleDbConnection objConn = new OleDbConnection('Provider=Microsoft.Jet.OleDb.4.0;Data Source=' & Server.MapPath('/_database/test01.mdb'));
    Line 11: OleDbCommand objCmd;
    Line 12: OleDbDataReader objRdr;


    Source File: E:\web\testing123\htdocs\ScheduleViewPDXOnly.aspx Line: 10

    Post Edited (mrpeepsshow) : 1/4/2006 8:58:48 PM GMT
     
  4. I'll second the thanks, this forum rocks /emoticons/hop.gif I'm just moving to discountASP and I really like what I see.
     
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