Professional Documents
Culture Documents
Data Access in
Data Access in
VB.NET
INTRODUCATION
.NET Framework consists of the common language runtime (CLR) and the .NET
Framework class library. The common language runtime is the foundation of .NET
Framework. Think of the runtime as an agent that manages code at execution time,
providing core services such as memory management, thread management, and
remoting, while also enforcing strict type safety and other forms of code accuracy
that promote security and robustness. In fact, the concept of code management is a
fundamental principle of the runtime. Code that targets the runtime is known as
managed code, while code that doesn't target the runtime is known as unmanaged
code. The class library is a comprehensive, object-oriented collection of reusable
types that you use to develop apps ranging from traditional command-line or
graphical user interface (GUI) apps to apps based on the latest innovations provided
by ASP.NET, such as Web Forms and XML web services.
2
ARCHITECTURE OF ADO .NET
3
ACCESSING DATA WITH SERVER
EXPLORER
⊡ Click “Connect to Database” in the Server Explorer window (if its not visible, you can
open it from the View menu, then click Server Explorer.)
⊡ Follow these steps in the Data Link Properties dialog box:
□ In the Select or enter a server name text box, type localhost.
□ Under Enter information to log on to the server, ( if you need security click Use
Windows NT Integrated security).
⊡ Click Select the database on the server, and then select Database from the list of
databases(eg Northwind ).
□ Click Test Connection to verify that the information is correct, and then click OK.
⊡ In the Customers table, select the following columns:Company Name Contact Name
Contact Title
⊡ Right-click in the SQL pane, and then click Verify SQL Syntax.
⊡ Right-click in the diagram pane, and then click Run.
⊡ Click Save, and then type CustomerInfo for the view.
4
DATA PROVIDERS
DATA PROVIDERS
5
IN TWO OR THREE COLUMNS
6
CREATE NEW DATA CONNECTION
7
DATA GRID CONTROL AND DISPLAYING DATA IN DATA GRID
⊡ The DataAdapter uses the Connection object of the . NET data provider to connect to
adata source, and Command objects to retrieve data from and resolve changes to the
datasource. The SelectCommand property of the DataAdapter is a Command object
that retrieves data from the data source.
8
THANK YOU