Scott Mitchell's ASP. NET 2.0 data tutorial ii bll layer learning problems

Source: Internet
Author: User
Several days ago, some students reported that they could not run according to the example in Scott Mitchell's ASP. NET 2.0 data tutorial II. Program An error is reported. The namespace named "norithwindtableadapters" cannot be found, causing the program to fail.
Error message: "error 1 cannot find the type or namespace name" norithwindtableadapters "(is the using command or assembly reference missing ?) D: \ code \ northwind \ WEB \ app_code \ BLL \ categories. CS 10 7 d: \... \ WEB \
".
If you encounter this problem, you can search by Google to get the desired answer. Foreigners answer this question (see http://forums.asp.net/t/1010504.aspx ):
I was able to fix this, though I still don't understand why it happens.

As Mr. freeman (Great job against the xen, By the way) mentioned, the namespace is auto-generated by. net. you can find out what namespace it created by opening the Class View and looking for the namespace objects (they look like braces :{}), in my case:

Namespace northwind STableadapters;

Notice the bold "S "? Changing the code to this namespace worked. Why vs did this I have no idea, neither vs nor the tutorial gives any indication where this name comes from.

I typed the code in myself rather than downloading it; I find I don't learn anything by downloading and running samples.
That is to say: Open the "Class View" window in vs. NET 2005 to find out why your namespace is. Note that the namespace here should contain"S", And then reference it in the program.

In addition, the "one-piece" mode of the design mode is used. If you are not clear about it, please google related documents.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.