Intimate contact asp.net (6)

Source: Internet
Author: User
About the use of namespace (namespaces)
In the previous program we saw that I used to <% @ Import namespace= "System.Data"%&GT;
With m$ for us to provide the namespace, which is different from the ASP, we must first quote in asp.net with our operations have
namespace to use the appropriate function after the shutdown. In fact plainly, a namespace; is a component.
This is an advanced application of asp.net, which I will explain later in the chapter. (But to write there, time ...)
)
Here's a simple list of some of the common namespace
<% @ Import namespace= "System.Data"%> processing data
<% @ Import namespace= "System.Data.ADO"% > Use ado.net; When you use the
<% @ Import namespace= "System.Data.SQL"%> SQL Server database dedicated
<% @ Import namespace= "System.Data.XML"%> do not need to look at processing XML
<% @ Import namespace= "System.IO"%> Processing files
<% @ Import namespace= "System.Web.Util"%> email when you use
<% @ Import namespace= "System.Text"%> text encoding
What you need to manipulate the database
Explaining the namespace, we can formally discuss the application of the database. From the above we can see that we operate
Database, we need to quote the following two namespace
<% @ Import namespace= "System.Data"%>
<% @ Import namespace= "System.Data.SQL"%>
In fact, System.Data.SQL can be replaced with System.Data.ADO, SQL is SQL Server-specific, ADO can
Supports any database (as long as there is a corresponding driver on the host), such as Access,mysql,oracle.
Here, because the database of flying knives is SQL Server, you could have used ADO, but think m$ separate the SQL out
Come on, why not? As for how much benefit it can bring, the flying knife has not been tested, the SQL Server is certainly more than ADO
A little better.
Whether it's ADO or SQL, they have several basic objects for operation
Connections links to a database for later applications (like Connections in ADO)

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.