I know there are multiple questions on here related to the same issue but none of the proposed solutions seem to work for me. Having said that, I'm an ASP.NET noob so am probably missing something obvious.
After completing a Data Access Layer tutorial, I tried to make a little project with a database called ASPNETDB.MDF
, laid out like this:
I created a data set called myDataSet, which is in the App_Code folder. I then created a table adapter:
From following the tutorial, I understand that I should include the line:
using myDataSetTableAdapters;
This results in a "namespace could not be found" error.
I've tried moving the data set out of the app_code folder, adding a prefix in the properties and a few other suggestions from questions and answers on here but nothing has worked so far.
Anyone have any ideas?
-EDIT-
Changing the line to using Login.App_Code.myDataSetTableAdapters as suggested in the answer below, now gives me a weird error; The type name App_Code does not exist in the type 'System.Web.UI.WebControls.Login' Maybe this is related to the problem?
-Edit2-
Due to the conflict caused by the site being named Login
, I changed it to myLogin
but now have namespace myLogin could not be found.
myDataSetTableAdapters
should be the name of the namespace that contains your table adapter.