| Back to Questions Page |
| |
| Question |
How to call the SQL commands asynchronously in ADO.NET
version 2.0 |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ DELL |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | here
executescalar()
executereader()
executenonquery()
these comes with Begin and End
like Beginexecutescalr()
Endexecutescalar()
.......
by using these command we can achieve asynch comm in
ado.net  |
| Jagan |
| |
| |
| Question |
what is typed and untyped dataset |
Rank |
Answer Posted By |
|
Question Submitted By :: Bali |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Typed Dataset provide compile time type checking. Also it
provides the names of the Columns of the types we are using
for that typed data set. This is something we dont get in
the normal datasets.  |
| Parvez Borkar |
| |
| |
| Answer | Typed vs. Untyped Datasets
A DataSet can be Typed or Untyped. The difference between
the two lies in the fact that a Typed DataSet has a schema
and an Untyped DataSet does not have one. It should be
noted that the Typed Datasets have more support in Visual
studio.  |
| Surjit |
| |
| |
|
|
| |
| Question |
What are the ADO.NET Controls? |
Rank |
Answer Posted By |
|
Question Submitted By :: Gajula.ramesh |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | i think dataAdaptercontrol,datasetcontrol  |
| Chaitanya |
| |
| |
| Answer | ADO.Net controls are
1/ SqlDataSource
2/ AccessDataSource
3/ ObjectDataSource
4/ DataSetDataSource
5/ XmlDataSource
6/ SiteMapDataSource  |
| Edwin [Synergy Multitech Ltd.] |
| |
| |
| Answer | 1.Gridview control
2.DataList control
3.Repeter control  |
| Rea [Synergy Multitech Ltd.] |
| |
| |
| Question |
I loaded the dataset with a table of 10 records. One of the
records is deleted from the backend, How do you check
whether all the 10 records were present while updating the
data(Which event and steps) and throw the exception. |
Rank |
Answer Posted By |
|
Question Submitted By :: KiranMadiraju |
| This Interview Question Asked @ Fulcrum-Logic , Satyam, Adfb |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | By Using the Transactions we can check the Exact Numbers of
the rows to be updated and if the updation fails then the
Transaction will be rollbacked.  |
| Aashish |
| |
| |
| Answer | use the timestamp datatype  |
| Amit [Capgemini] |
| |
| |
| Question |
What is the difference between a Dataset and DataReader?
Can dataReader hold data from multiple tables? |
Rank |
Answer Posted By |
|
Question Submitted By :: Kiran |
| This Interview Question Asked @ Fulcrum-Logic |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | data set a collection of datatables and we can edit the
data in the datatables and the same can be persisted to
databae using adapter in the disconnected maner by using
commandbuilder or insert,update,select command.
datareader is just the container for data,its readonly and
forwardonly curosr.this follows connected architecture,that
means when we are reading data from datareader at that time
connection should be kept open.
data reader can hold data from multiple tables and
datareader can hold more than one table.
Example:
string query="select * from employee;select * from student";
sqlcommand cmd=new sqlcommand(query,connection);
sqldatareader dr=cmd.executeReader();
if(dr.hasrows)
{
dr.read();
gridview1.DataSource=dr;
gridview1.Databind();
if(dr.nextresult)
{
gridview2.datasource=dr;
gridview2.databind();
}
}
dr'colse();
connection.close();
if anybody have any doubts,mail to me on karun84@gmail.com  |
| Karna |
| |
| |
| Question |
what is meant by connection pooling and event pumbling in
ado.net |
Rank |
Answer Posted By |
|
Question Submitted By :: Sujjuoct28@yahoo.co.in |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Connection Pooling:-
Connection pooling reduces the number of times that new
connections need to be opened. The pooler maintains
ownership of the physical connection. It manages
connections by keeping alive a set of active connections
for each given connection configuration. Whenever a user
calls Open on a connection, the pooler looks to see if
there is an available connection in the pool. If a pooled
connection is available, it returns it to the caller
instead of opening a new connection. When the application
calls Close on the connection, the pooler returns it to the
pooled set of active connections instead of actually
closing it. Once the connection is returned to the pool, it
is ready to be reused on the next Open call.  |
| Gyany |
| |
| |
| Answer | connection pool is set of active connections object,so that
someone else can make use of it without waiting of creating
the new connection.The number of connections allowed to a
particular database may be limited due to server capacity
or database licensing restrictions.  |
| Prabhat Saxena(lmp) |
| |
| |
| Question |
how would i implement dropdownlist in gridview using c# |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | using item template  |
| Guest |
| |
| |
| Answer | <asp:GridView ID="GridView1" AutoGenerateColumns ="false"
Font-Size=Small Font-Names="Verdana" GridLines="None"
runat="server">
<Columns>
<asp:TemplateField HeaderText="Customer name" >
<ItemTemplate>
<asp:DropDown ID="DDcustname"
runat="server"></asp:DropDown>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>  |
| Indra |
| |
| |
| Question |
What are the three Objects of ADO. |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | 1.Connection
2.Command
3.Adapter  |
| Debasis |
| |
| |
| Answer | 1.connection
2.command
3.record set  |
| Abhi |
| |
| |
| Answer | 1.Connection
2.Command
3.Record set.  |
| Avanish Singh |
| |
| |
| Answer | connection
command
data reader  |
| Prasad |
| |
| |
| Answer | 1)Connection Object
2)Command Object
3)DataAdapter  |
| Vishwajit Kumar |
| |
| |
| Answer | Parameters
Properties and
Errors  |
| Santosh |
| |
| |
| Answer | Not Three objects.
ADO provides two objects for managing connections with data
sources
i.e., 1/Connection and 2/ Command
And two objects for managing the data returned from a data
source ie.,1/ Field and 2/ Recordset
And three secondary objects i.e.,1/ Parameters,
2/ Properties, and 3/ Errors for managing information about
ADO.  |
| Edwin |
| |
| |
| Question |
what is bubbled event can u pls explain |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ Wipro |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | When you have a rich control, like DataGrid, Repeate
dataList, writing an event processing routine for each
object (cell, button, row, etc.) is quite tedious. The
controls can bubble up their eventhandlers, allowing the
main DataGrid event handler to take care of its constituents.  |
| Ramana |
| |
| |
| Answer | all heavy controls like grid view,datagrid or
datalist,repeater controls cantains the chield controls
like button or link button, when we click this button then
the event will be raised, that events are handled by parant
controls,that is called event bubbling,means event is
bubbled from bottom(chield)to up(parant),  |
| Prabhat Saxena(manu) |
| |
| |
| Question |
what is different between SqlCommand object and Command
Behaviour Object |
Rank |
Answer Posted By |
|
Question Submitted By :: Baskarg83 |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | ADO.NET Command Object - The Command object is similar to
the old ADO command object. It is used to store SQL
statements that need to be executed against a data source.
The Command object can execute SELECT statements, INSERT,
UPDATE, or DELETE statements, stored procedures, or any
other statement understood by the database. See sample
code...
'Code below in VB.NET ...
Dim ObjCom as SqlClient.SqlCommand
ObjCom.SqlConnection(strCon)
ObjCom.Connection.Open()
ObjCom.CommandText = "Select * from tblSample"
ObjCom.ExecuteNonQuery()
SqlCommand objects are not used much when we use datasets
and data adapters. Following are some properties of the
SqlCommand class...  |
| Sudhir Kumar Pal |
| |
| |
| Answer | CommandBehaviour:-
Provides a description of the results of the query and its
effect on the database.
Like,
To Forcibly close the Connection=
Command cmd=new Command
("SQL",conn,CommandBehaviour.CloseConnection);  |
| Gyany |
| |
| |
| Question |
once data is fetched into dataset connection gets closed. but in datareader
connection is always maintained...then why datareader is fast and mainly
recommended ?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Darshan.naokhare |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | datareader is forwardonly thus is fast and is mostly used
while retrieving the data from the database.  |
| Abhishek |
| |
| |
| Answer | DataSet carry considerable overhead because of relations,
multiple tables,
While DataReader only readony and fawardonly stream of
data, it fatch only one row at a time. thats y its faster  |
| Hhh [HCL Tech] |
| |
| |
| Question |
What is the main difference between ADO and ADO.Net |
Rank |
Answer Posted By |
|
Question Submitted By :: Bsatish |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | ADO- Connection-Oriented Architecture
Use Record Set
Communicate in Binary mode
Ado.net Dis-connected architecture
Use DataSet,Adapter
Parse Data in XML mode  |
| Hhh |
| |
| |
| Answer | ADO was a connected data access model, which means that when
a connection to the database is made, the connection remains
open until the application is closed.
ADO.NET is disconnected database access model, which means
when an application interacts with the database, the
connection is opened to serve the request of the
application, and is closed as soon as the request is completed.
All data is presented in XML, as compared to ADO.  |
| Jyoti [BUTLER INTERNATIONAL] |
| |
| |
| Answer | The old ADO (ActiveX Data Object) has evolved to ADO.NET in
the .NET Framework. The ADO.NET object is a lightweight
object. The ADO Recordset was a huge object in ADO. It
provided the ability to support multiple types of cursors.
It provided fast lightweight "firehose" cursor and also
supported a disconnected client-side cursor that supported
tracking, optimistic locking, and automatic batch updates of
a central database. However, all of this functionality was
difficult to customize.
ADO.NET breaks the functionality of the ADO object to
multiple classes, thereby allowing a focused approach to
developing code. The ADO.NET DataReader is equivalent to the
"firehose" cursor. The DataSet is a disconnected cache with
tracking and control binding functionality. The DataAdapter
provides the ability to completely customize how the central
data store is updated with the changes to a DataSet.  |
| Babina [BUTLER INTERNATIONAL] |
| |
| |
| Question |
When multiple users attempt to modify data at the same time
Ex user 1 is updating record at same time user2 deleted
record sucessfully.now user1 has press update button . how
to handle concurrency
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Have one column with in Database table with datatype as
TimeStamp and while selecting the row we will read the
TimeStamp value, which we can compare at the time of updation,
if both values are same then we can update that row
otherwise we can resist the user from updating saying that
someone has updated the row, you can't update it.  |
| Umar Topia |
| |
| |
| Answer | You can use one primary key and one timestamp field to sort
out the problem of concurrency.
The steps are like this
1.Fetch the record from database and store the primary key
value and timestamp in the session.
2.Update the same record with new values other fields using
the same session values for primary key and timestamp fields.  |
| KiranMadiraju |
| |
| |
| Answer | we can have to use exclusive locks on the table thats why
we can't change data at a time..  |
| Shweta |
| |
| |
|
| |
|
Back to Questions Page |