ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories >> Software >> Microsoft-Related >> ADO.NET
 
 


 

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
 
0
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.
 
0
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.
 
0
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
 
0
Chaitanya
 
 
Answer
ADO.Net controls are

1/ SqlDataSource 
2/ AccessDataSource 
3/ ObjectDataSource 
4/ DataSetDataSource 
5/ XmlDataSource 
6/ SiteMapDataSource
 
0
Edwin
[Synergy Multitech Ltd.]
 
 
Answer
1.Gridview control
2.DataList control
3.Repeter control
 
0
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.
 
0
Aashish
 
 
Answer
use the timestamp datatype
 
0
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
 
0
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.
 
1
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.
 
5
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
 
0
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>
 
0
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
 
0
Debasis
 
 
Answer
1.connection
2.command
3.record set
 
0
Abhi
 
 
Answer
1.Connection
2.Command
3.Record set.
 
0
Avanish Singh
 
 
Answer
connection
command
data reader
 
0
Prasad
 
 
Answer
1)Connection Object
2)Command Object
3)DataAdapter
 
0
Vishwajit Kumar
 
 
Answer
Parameters
Properties and
Errors
 
0
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.
 
0
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.
 
5
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),
 
0
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...
 
0
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);
 
0
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.
 
2
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
 
0
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
 
0
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.
 
0
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.
 
0
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.
 
1
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.
 
0
KiranMadiraju
 
 
Answer
we can have to use exclusive locks on the table thats why 
we can't change data at a time..
 
0
Shweta
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com