Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
4) State some of the basic steps required to access and manipulate data?
Some of the basic steps which should be taken to access and manipulate data are as
follows.
* Creating connection object which helps to connect to a database.
* Record set object should be created which facilitates connection to receive data.
* Opening of the connection
* Passing the desired name for your table and performing necessary functions on the
fetched data.
* Changes can be done by using the commands update and update batch.
What is a DataSet?
Posted by: Abhisek | Show/Hide Answer
The Dataset is the central object in ADO.NET. DataSet is a logical container of data. It
represents a set of data tables referenced as one unit in the application.
With this object you can get all the data you need from each table quickly, examine and
change it while you are disconnected from the server and then update the server with
changes in an efficient operation.
The first parameter will take the name of the dataset to be filled and the second parameter
specifies the name of the DataTable in the DataSet which will contain the data.
3>Interoperability:-
As ADO.NET transmits the data using the format of XML which is not dependent on
ADO.NET or windows platform.
5>Performance:-
The performance in ADO.NET is higher in comparison to ADO that uses COM
marshalling.
6>Firewall:
As in ADO.NET transmission is via XML format, therefore it can pass through firewalls.
Connection Object:- It is used to connect to the data source. Data source can be any
database file. The connection object contains information like the provider name, server
name, datasource name, user name and password.
DataReader Object:- It is used to read the data in a fast and efficient manner from the
database. It is generally used to extract one or a few records or specific field values or to
execute simple SQL statement.
DataAdapter Object:- It is used to fill data from the database into the DataSet object. it
is use din the disconnected approach.
To solve this problem the latter version of ADO used RecordSet. All the contents from
the data source were copied into RecordSet. This allows clients to get disconnected from
the server, work on the RecordSet and copy the changes back to the data source again.
This approach did not succeed much because it requires COM marshalling to transmit
disconnected data, it support only those datatypes that were defined by the COM
standards and hence required type conversion.
ADO.NET can be used to access data sources using new .NET data providers as well
as existing OLEDB data providers using the OLEDB.NET data provider.
We can create DataView in two ways. Either we can use the DataView constructor, or we
can create a reference to the DefaultView property of the DataTable.
True - It Check more result remain to read and reader will forward to next result.
False - No more result set found
DataTable
DataColumn
DataRow
DataRealation
Constraint
2)DataTableMapping
To add a new row in DataTable, we can use NewRow() method of the DataTable object.
(Here assume that there are two columns Name, Address in the DataTable.
row["Address"] = "USA";
dTable.Rows.Add(row);
eg.
DataView dView = new DataView(dTable);
DataAdapter object can accept either DataTable or DataSet as parameter to fill data from
database.
eg.
SqlDataAdapter dAd = new SqlDataAdapter();
----
---
We should only use DataSet as parameter when we are expecting more than one result set
is being returned from database.
What is a Linked Server?
Posted by: Neeks | Show/Hide Answer
A linked server configuration enables SQL Server to execute commands against OLE DB
data sources on remote servers. Linked Servers is a concept in SQL Server by which we
can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL
Statements.
Linked servers offer the following advantages:
With a linked server, you can create very clean, easy to follow, SQL statements that
allow remote data to be retrieved, joined and combined with local data. Stored Procedure
sp_addlinkedserver, sp_addlinkedsrvlogin will be used add new Linked Server.
If you have more than one lakh rows in database table,while printing
that table in frontend performence will be degraded. for that
what do you do to improve the performence?
Posted by: Goud.ranjith | Show/Hide Answer
increase the execution time out in web.config (or)increase the connection time out in
connection string
1. Why are Server control tags shown in the browser instead of the controls it
represents?
This is because the server control tags were not converted into their respecting
HTML element tags by ASP.Net. This happens when ASP.Net is not properly
registered with IIS. .Net framework provides an Administration utility that
manages the installation and uninstallation of multiple versions of ASP.NET on a
single machine. You can find the file in
C:\WINNT\Microsoft.NET\Framework\v**\aspnet_regiis.exe use the command:
aspnet_regiis.exe -u ---> to uninstall current asp.net version. use the command:
aspnet_regiis.exe -i ---> to install current asp.net version
2. What are the Best practices for side-by-side execution of Framework 1.1 and
2.0?
In ASP.NET, applications are said to be running side by side when they are
installed on the same computer, but use different versions of the .NET
Framework.
3. Can I have VS.NET and the Visual Studio 6.0 installed on the same machine?
Yes! VS.Net works with the .Net framework, while VS6.0 works with MFC or
the Windows API directly, for the most part. They can be installed and run on the
same machine without any considerations.
if you install biztalk server it provides Biztalk Project in the project types like
webproject, windows project, console project. We use rest of the products of the
Biztalk like adapters and all those thing and use them in .net.
11. Can you explain the difference between an ADO.NET Dataset and an ADO
Recordset?
o A DataSet can represent an entire relational database in memory, complete
with tables, relations, and views.
o A DataSet is designed to work without any continuing connection to the
original data source.
o Data in a DataSet is bulk-loaded, rather than being loaded on demand.
o There's no concept of cursor types in a DataSet.
o DataSets have no current record pointer You can use For Each loops to
move through the data.
o You can store many edits in a DataSet, and write them to the original data
source in a single operation.
o Though the DataSet is universal, other objects in ADO.NET come in
different versions for different data sources.
12. In .NET Compact Framework, can I free memory explicitly without waiting
for garbage collector to free the memory?
.NET Compact Framework come with CLR which perform automatic garbage
collector to free the memory without using destector(perform garbage collector
when is declear)