I was just learning today about a ASP.Net data access layer (DAL) lesson from Scott Mitchell on the following site:
http://www.asp.net/learn/data-access/tutorial-01-vb.aspx
I like the lesson, but I was immediately blocked at the first example, for Visual Studio 2008 didn't accept the following imports statement:
Imports NorthwindTableAdapters
The compiler didn't compile because the namespace couldn't be found. After digging the internet and experimenting myself, after some hours I found out that I had to alter the statement into the following:
Imports DataTutorial.NorthwindTableAdapters
So it's just the name of the solution / project in front of the NorthwindTableAdapters.
I also contacted Scott about this and he said the cause of it might be that I started this example as a Web Application project instead of a Web Site. Indeed this was the case, so I started the tutorial all over again, now with a Web Site.
I didn't noticed the possibility of creating a new Web Site before. It's right away in the File menu of Visual Studio, but I had choosen File - New Project and choose the ASP.Net Web Application.
After starting a new Web Site it worked, however it's worth mentioning that before adding the AllProducts.aspx webpage, you should first build your solution.
I noticed Intellisense didn't recognize NorthwindTableAdapters when I didn't build the site before adding the webpage, but when I removed the AllProducts.aspx page and builded the website first and then added the AllProducts.aspx webpage, it all worked.
Recent comments
12 weeks 23 hours ago
16 weeks 12 hours ago