locked
Error_103 Name 'LocationsDB' is not declared RRS feed

  • Question

  • User-1252885237 posted

    Anybody else get this error when trying to run and test the classified application?

    Error 103 Name 'LocationsDB' is not declared

    Can someone post their code here for the declaration?

    Thursday, August 27, 2009 5:42 PM

All replies

  • User2130758966 posted

    Have you altered the files at all?

    I just downloaded the starter kit, installed it and created a new project no problem in visual studio 2008.

    In App_Code/BLL/LocationsDB.cs there is this file:

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using LocationsDataComponentTableAdapters;
    
    namespace AspNet.StarterKits.Classifieds.BusinessLogicLayer
    {
        public sealed class LocationsDB
        {
            private LocationsDB()
            {
    
            }
    
            public static LocationsDataComponent.LocationsDataTable GetAllLocations()
            {
                using (LocationsDataAdapter db = new LocationsDataAdapter())
                {
                    return db.GetAllLocations();
                }
            }
    
            public static void RemoveLocation(int locationId)
            {
                using (LocationsDataAdapter db = new LocationsDataAdapter())
                {
                    db.RemoveLocation(locationId);
                }
            }
    
            public static void InsertLocation(string name)
            {
                using (LocationsDataAdapter db = new LocationsDataAdapter())
                {
                    db.InsertLocation(name);
                }
            }
        }
    }
    


    Thursday, August 27, 2009 6:21 PM
  • User-1252885237 posted

    agh.  I don't know what happened with my file but I put it back and it now works.  Thanks for your response.

    Thursday, August 27, 2009 6:41 PM