GeekInterview.com
Series: Subject: Topic:

ADO.NET Interview Questions

Showing Questions 21 - 40 of 58 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

What is meant my datarow versioning in ADO.Net. Where it is used?

Asked By: guruprasad | Asked On: May 11th, 2007

Star Read Best Answer

Editorial / Best Answer

Answered by: Lavanyaaru

View all questions by Lavanyaaru   View all answers by Lavanyaaru

Member Since Jan-2008 | Answered On : Jan 29th, 2008

There are 3 versions for each DataRow object.
1.Original
2.Current
3.Proposed

The HasVersion( ) method of the DataRow can determine whether a specific version of the row exists. If the version exists, column values for it can be retrieved using one of the three overloads of the DataRow indexer


The Original version contains the values that were loaded into the row.

The Current version contains the latest version of the data, including the changes made since the data was originally loaded. The Original version isn't available for newly created rows.

A Proposed row version is made available while the row is in edit mode and contains the changes that have been made to the row while it was in edit mode

If CancelEdit( ) , RejectChanges() methods are called, the values in the Proposed version are simply discarded

Answered by: Lavanyaaru on: Jan 29th, 2008

There are 3 versions for each DataRow object.1.Original2.Current3.ProposedThe HasVersion( ) method of the DataRow can determine whether a specific version of the row exists. If the version e...

How many app domains an ASP.Net worker process creates if suppose 10 different users are logged into the web site

Asked By: ashik_wani | Asked On: Jan 5th, 2007

Star Read Best Answer

Editorial / Best Answer

Answered by: nishant2200

View all answers by nishant2200

Member Since Jan-2007 | Answered On : Jan 7th, 2007

One AppDomain is created in the aspnet_wp.exe worker process per website. Inside that appdomain, user's state is kept separate from each other, and from then on server memory side state management can be segregated on basis of Session, Profile etc.

Answered by: nishant2200 on: Jan 7th, 2007

One AppDomain is created in the aspnet_wp.exe worker process per website. Inside that appdomain, user's state is kept separate from each other, and from then on server memory side state management can be segregated on basis of Session, Profile etc.

What is the difference between .Net framework and .Net compact framework?

Asked By: Gopal krishna | Asked On: Jan 3rd, 2007

Star Read Best Answer

Editorial / Best Answer

Answered by: bb.geetha

View all answers by bb.geetha

Member Since May-2008 | Answered On : Jun 12th, 2008

The .NET Compact Framework is a subset of the .NET Framework designed for small-footprint devices. It includes most, but not all of the base class library available in the full framework.

Answered by: samina naaz on: Jun 30th, 2010

The .NET Compact Framework is a subset of the .NET Framework designed for small-footprint devices.

Answered by: ptharak on: Oct 20th, 2008

DataREader is ued for readonly and forward .
Dataset is used to either read and Write

Whenever sequential is read needed then you can go for DtaREader , it gives better performance than DataSEt.

Using DataSEt you can get entire relationship of the tables and schema.

What are the steps to connect to a database?

Asked By: lakshminarayanan | Asked On: Dec 20th, 2006

Star Read Best Answer

Editorial / Best Answer

Answered by: nishant2200

View all answers by nishant2200

Member Since Jan-2007 | Answered On : Jan 7th, 2007

1. Create a connection. This requires a connection string, which can be given declaratively or put in a well defined place like the .config files. Advantage of keeping in .config files is that it enables use of Connection Pooling by .Net framework, else even one small change in connection string will cause CLR to think it's not the same connection and will instantiate new connection for other request.

2. Open the connection and keep it open until done, typically done as using (con) { //use }

3. If using connected data model, create a SqlCommand object, decorate it with desired command, command type (stored procedure for eg), add any parameters and their values to the command, and then consume the command by using ExcuteReader or ExecuteScalar. In case of ExecuteReader, we will get back a handle to a fast-forward, read only pointer to the recordset. We can also decorate Command object with multiple recordsets in 2.0 and execute one by one (MARS - Multiple Active Record Sets)

4. If using disconnected data model, create a DataAdapter object, decorate it with desired SELECT, INSERT, UPDATE, DELETE commands, add parameters as necessary and then fill up a DataSet or DataTable using the DataAdapter. Subsequent  SQL can be executed using insert, update, delete commands on the dataset.

Answered by: ushalakshmi on: Apr 17th, 2008

TO Connect to a DatabaseFirst we need to have a namespace like System.Data.Sqlclientthen connect to database as follows1.Create connection using SqlConnection Sqlconnection con=new sqlconnection(...

Answered by: johnjustin on: Apr 8th, 2008

1. Implements the base class for data access
2. Create a connection
3. Open that connection
4. Create a data reader and execute the data reader with proper sql statements
 You can get the values of the record using the methods GetString, GetInt32 ....etc.

Explain the differences between ADO and ADO.Net, asp and ASP.Net , vb and vb.Net

Asked By: srennu | Asked On: Sep 18th, 2006

Star Read Best Answer

Editorial / Best Answer

Answered by: ramakrishnag1982

View all questions by ramakrishnag1982   View all answers by ramakrishnag1982

Member Since Nov-2006 | Answered On : Dec 12th, 2007

Asp:

* ASP is Interpreted language based on scripting languages like Jscript or VBScript.
* ASP has Mixed HTML and coding logic.
* Limited development and debugging tools available.
* Limited OOPS support.
* Limited session and application state management.
* Poor Error handling system.
* No in-built support for XML.
* No fully distributed data source support.

Asp.Net:

* ASP.Net is supported by compiler and has compiled language support.
* Separate code and design logic possible.
* Variety of compilers and tools available including the Visual studio.Net.
* Completely Object Oriented.
* Complete session and application state management.
*  Full proof error handling possible.
* Full XML Support for easy data exchange.
* Fully distributed data source support.

Answered by: ramakrishnag1982 on: Dec 12th, 2007

Asp:* ASP is Interpreted language based on scripting languages like Jscript or VBScript. * ASP has Mixed HTML and coding logic. * Limited development and debugging tools available. * Limited OOPS supp...

Answered by: Guest on: Jan 4th, 2007

ADO1.  This object model could be used even for non RDBMS products.  We can read data from xml, excel, csv files also.2.  ADO objects are dependent on OLEDB providers and OLEDB provider...

What are the advantages and disadvantages of using datalist ?

Asked By: madhureddy318 | Asked On: Aug 22nd, 2006

Star Read Best Answer

Editorial / Best Answer

Answered by: spandanapotla

View all answers by spandanapotla

Member Since Mar-2008 | Answered On : Apr 4th, 2008

Adv: the DataList's display is defined via templates,DataList allows for much more customization of the rendered HTML markup , by which it is more user-friendly displays of data.

DisAdv:
adding such functionality with the DataList takes more development time than with the DataGrid, as

  • The Edit/Update/Cancel buttons that can be created in a DataGrid via the EditCommandColumn column type, must be manually added to the DataList, and
  • The DataGrid BoundColumn column types automatically use a TextBox Web control for the editing interface, whereas with the DataList you must explicitly specify the editing interface for the item being edited via the EditItemTemplate.

Answered by: spandanapotla on: Apr 4th, 2008

Adv: the DataList's display is defined via templates,DataList allows for much more customization of the rendered HTML markup , by which it is more user-friendly displays of data.DisAdv: adding suc...

Answered by: gouri on: Aug 29th, 2006

Hi,

Datalist is updateable and datareader is not updateable

How many records can take clustured index in SQL server

Asked By: Aryan Khan | Asked On: Mar 29th, 2006

Star Read Best Answer

Editorial / Best Answer

Answered by: vvijaychandra

Answered On : Jun 22nd, 2006

a clustered index is a special type of index that reorders the way the records in the table are physically stored . therefore the table can have only one clustered index.

Answered by: Pendurti on: Sep 14th, 2008

FYI..Clustered index is something that deals with the columns but not the records.These define the physical sorting of the rows in the database in the storage media.A database table can have utmost on...

Answered by: ushalakshmi on: Apr 17th, 2008

A clustered index is a special type of index that reorders the way records in the table are physically stored. Clustered index is created by default when we create a primary key on a column.Everyone k...

Why can't we use multiple inheritance and garbage collector parallelly in .Net

Asked By: Amit | Asked On: Jan 16th, 2006

Star Read Best Answer

Editorial / Best Answer

Answered by: Pendurti

View all answers by Pendurti

Member Since Sep-2008 | Answered On : Sep 11th, 2008

Well C# doesn't support multiple inheritance through classes.

If you want to have multiple inheritance in your program, you need to make use of interfaces. A class cannot inherit from more than one class but a class can inherit from more than one interfaces. So C# supports multiple inheritance through interfaces. 
And multiple inheritance and garbage collection can work independent of each other because, in .NET framework, garbage collection is taken care of by CLR. We can also manually invoke garbage collector using gc.collect(). 

Answered by: Pendurti on: Sep 11th, 2008

Well C# doesn't support multiple inheritance through classes.If you want to have multiple inheritance in your program, you need to make use of interfaces. A class cannot inherit from mor...

Answered by: Mob: +91 9849255958 on: Jan 4th, 2007

Actually, GC is a low-level thread.  When it gets activated, all other threads in the applications are put on hold.

What is the execution procedure in Oracle ?

Asked By: Interview Candidate | Asked On: Jul 31st, 2005

Star Read Best Answer

Editorial / Best Answer

Answered by: sahu

View all questions by sahu   View all answers by sahu

Member Since Dec-2005 | Answered On : Mar 29th, 2007

Hi,

if you Passing Parameters,
then
Below  it will excute

typesql> execute Procedure_name(arg1,arg2,...,arg n);...

if donot pass Parameters
then
typesql> execute Procedure_name

Answered by: sahu on: Mar 29th, 2007

Hi,

if you Passing Parameters,
then
Below  it will excute

typesql> execute Procedure_name(arg1,arg2,...,arg n);...

if donot pass Parameters
then
typesql> execute Procedure_name

Answered by: RaviKumar on: Oct 28th, 2005

type

sql> execute Procedure_name(arg1,arg2,...,arg n);

How to find the given query is optimised one or not?

Asked By: Interview Candidate | Asked On: Jul 31st, 2005

Star Read Best Answer

Editorial / Best Answer

Answered by: Vishal

Answered On : Apr 5th, 2006

You can use Execution Plan in SQL server to see the cost of your querry.By this you can optimised your query.

Answered by: Pendurti on: Sep 11th, 2008

There is something called Query analyzer that u can make use of to find out whether the given query is optimized or not. 


Answered by: sahu on: Mar 29th, 2007

Hi,

 First  Excute  Sql Quries in Query Analzer,see How much time 2 take Excute , if Less then the ur desired Time, then it will Optimize query

How to copy the contents from one table to another table and how to delete the source table in ADO.Net?

Asked By: Interview Candidate | Asked On: Jul 31st, 2005

Star Read Best Answer

Editorial / Best Answer

Answered by: samiksc

View all answers by samiksc

Member Since Oct-2005 | Answered On : Jul 12th, 2007

The question can mean 2 tasks -
1. Copy one 'datatable' to another and delete the source 'datatable' OR
2. Copy one database table (say a table in sql server database) to another database table, and delete the source table which is in the SQL server database. This operation is to be performed using ADO.Net

Answers:
1. DataTable newOne = originalOne.Copy(); originalOne.Dispose(); -- Note that originalOne.Clear() will simply delete all rows from the table, but the table object with its structure will remain there.
2. Run DDL commands using 'ExecuteNonQuery' method of DataCommand object.
e.g. string cmdText1 = "create table newOne as select * from originalOne" (copy table to another)
string cmdText2 = "drop table originalOne";
DataCommand dataCmd = new SqlDataCommand(cmdText1, conn);
conn.Open();
dataCmd.ExecuteNonQuery();
dataCmd.CommandText = cmdText2;
dataCmd.ExecuteNonQuery();
conn.Close();

Answered by: sathin on: Oct 29th, 2009

This is definitely possible. I tried making it simple by talking two gridviews in the design part and writing the below code when you try creating a datatable do avoid the new keyword Imports S...

Answered by: Dharmesh279 on: Oct 18th, 2008

We can copy the contents from 1 table to another table by using Bulk Copy and delete a table by simply write the query of drop a table when we create sqlcommand object.

What is ADO.Net

Asked By: shruthi | Asked On: Oct 3rd, 2005

Star Read Best Answer

Editorial / Best Answer

Answered by: Ranjit

View all answers by Ranjit

Member Since Oct-2005 | Answered On : Nov 28th, 2005

ADO.NET is the primary relational data access model for Microsoft .NET-based applications. It may be used to access data sources for which there is a specific .NET Provider, or, via a .NET Bridge Provider, for which there is a specific OLE DB Provider, ODBC Driver, or JDBC Driver. ADO.NET is sometimes considered an evolution of ADO technology, but it is important to note that some major changes were made between the two.

Answered by: Pendurti on: Sep 11th, 2008

ADO.NET is something that allows us to interact with relational databases and other data sources. It is a technology that ASP.NET applications use to communicate with a database, whether we need to add a new customer record, make a  purchase, or display a product catalog. 

Answered by: shravanmadhastu on: May 24th, 2008

ADO.NET stands Active X Data Objects.Net.It is used in microsoft.net to communicate with datastore.ADO.NET is inherited from System.Data.dll name spaceADO.NET has two componentsthey are 1. .Net Data p...

What is the default view of data grid?

Asked By: Srikanta Nandi | Asked On: Aug 21st, 2007

Star Read Best Answer

Editorial / Best Answer

Answered by: spandanapotla

View all answers by spandanapotla

Member Since Mar-2008 | Answered On : Apr 2nd, 2008

The DataGrid default view is tabular form and optionally supports selecting, sorting, paging, and editing the data

Answered by: ptharak on: Nov 11th, 2010

 like a table with columns and rows.

Answered by: rajaguru.g on: Aug 17th, 2010

We apply the filter condition and provide the result set.

Abstract class and interface

Asked By: vaibhav Tyagi | Asked On: May 7th, 2010

Demonstrate a situation when and why you would use abstract class and interface in your project?

Answered by: bhatnagar_prachi845 on: Sep 29th, 2010

As multiple inheritance is not permitted but using interfaces we can implement this. Abstract class is used when any derived class wants to implement a base function differently.

Transaction processing namespace

Asked By: sreeneela | Asked On: Dec 19th, 2009

What is the namespace within the Microsoft .Net framework which provides the functionality to implement transaction processing called as?

Answered by: AndrewMcAlister on: Aug 8th, 2010

There are at least 4 transaction namespaces.

System.Transactions for scope type transactions, and for database specific transactions under System.Data.SqlClient, System.Data.OracleClient and System.Data.ODBCClient

Answered by: Jayant Gupta on: Jan 19th, 2010

System.Data.SqlClient.SqlTransaction

How we can show image from database to our web form

Asked By: nidhi.amulya | Asked On: Apr 18th, 2008

Answered by: parshu_mail on: Jun 18th, 2010

All the answers are refering to storing the file in a physical file system. but, we do have the Blog and CBlog datatypes to store the binary informaiton into the DB and retrieve the same and use them.

Answered by: suresh.k.85 on: Mar 1st, 2010

Using image datatype in SQL Server 2005

Why edit is not possible in repeater??

Asked By: tukuna | Asked On: Jun 20th, 2006

Answered by: amitdotchauhan on: Jun 15th, 2010

Repeater itself a presentation control, not the data editing control.Repeater still can support a multiple records updates which i have done to support some client requirements.Basically its not the b...

Answered by: Varung5 on: Jun 15th, 2010

Repeater control does not have default selecting and editing support. This control is just to read and display the information. This control has better performance. But if you want to enable the editi...

Does SQLclient and oledb class share the same functionality

Asked By: Anil Chauhan | Asked On: Jul 10th, 2006

Answered by: Varung5 on: Jun 15th, 2010

SQLClient: 1. It does not use translation layer. So providing high performance. 2. This is only to connect with SQL server. OleDB: 1. We can connect with any database using OLEDB. 2. There is a transl...

Answered by: ynvpavan on: Jul 10th, 2008

sqldata provider is a native provider for the sqlserver developed by micrsoft, it contains all native drivers that gets connected to the sqlserver. Where as, oledbprovider is to make access to any dat...

What is the difference between server.Transfer and response.Redirect

Asked By: sambit | Asked On: Jul 3rd, 2007

Answered by: priyansh rawal on: Apr 22nd, 2010

Server.transfer: Method ends the current webform and will executes the next webform.


Response.redirect: it helps to navigate between the webforms through code and this is equal to clicking a hyperlink..

Answered by: adib4u2000 on: Dec 1st, 2008

One more thing...
Server.Transfer supports only ASPX pages but Response.Redirect applies even HTML pages

Explain how asp .Net provides increased performance.

Asked By: sreeneela | Asked On: Dec 19th, 2009

Answered by: stalera on: Apr 3rd, 2010

Disabling the view state wherever necessary, having ajax play its role, removal of unnecessary controls. storing view state at server side if the view state is very heavy.

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.