<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>PROGRAMMER DESK &#187; Ado.Net</title>
	<atom:link href="http://vinayhatwal.wordpress.com/category/net/adonet/feed/" rel="self" type="application/rss+xml" />
	<link>http://vinayhatwal.wordpress.com</link>
	<description>Accept Changes To Develop Good Solutions</description>
	<lastBuildDate>Sun, 02 Aug 2009 10:34:20 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='vinayhatwal.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/fddfa1cd68a112c3fb6eca04033658e3?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>PROGRAMMER DESK &#187; Ado.Net</title>
		<link>http://vinayhatwal.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vinayhatwal.wordpress.com/osd.xml" title="PROGRAMMER DESK" />
		<item>
		<title>ADO.NET INTERVIEW QUESTIONS</title>
		<link>http://vinayhatwal.wordpress.com/2008/07/25/adonet-interview-questions/</link>
		<comments>http://vinayhatwal.wordpress.com/2008/07/25/adonet-interview-questions/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 05:06:25 +0000</pubDate>
		<dc:creator>vinayhatwal</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Ado.Net]]></category>

		<guid isPermaLink="false">http://vinayhatwal.wordpress.com/?p=8</guid>
		<description><![CDATA[ 
To test a Web Service you must create a windows application or web application to consume this service? It is True/False?
FALSEHow many classes can a single.NET DLL contain?
Answer1:
As many
Answer2:
One or more
What are good ADO.NET object(s) to replace the ADO Recordset object?
The differences includes
In ADO, the in-memory representation of data is the recordset.
In ADO.net, it is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vinayhatwal.wordpress.com&blog=4320862&post=8&subd=vinayhatwal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> </p>
<p class="MsoNormal" style="background:white;line-height:12pt;margin:0;"><strong><span style="font-size:9pt;color:#666b71;font-family:Verdana;">To test a Web Service you must create a windows application or web application to consume this service? It is True/False?</span></strong><span style="font-size:9pt;color:#666b71;font-family:Verdana;"><br />
FALSE<strong><span style="font-family:Verdana;">How many classes can a single.NET DLL contain?</span></strong><br />
Answer1:<br />
As many</p>
<p>Answer2:<br />
One or more</p>
<p><strong><span style="font-family:Verdana;">What are good ADO.NET object(s) to replace the ADO Recordset object?</span></strong><br />
The differences includes<br />
In ADO, the in-memory representation of data is the recordset.<br />
In ADO.net, it is the dataset<br />
A recordset looks like a single table in ADO<br />
In contrast, a dataset is a collection of one or more tables in ADO.net<br />
ADO is designed primarily for connected access<br />
ADO.net the disconnected access to the database is used<br />
In ADO you communicate with the database by making calls to an OLE DB provider.<br />
In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.<br />
In ADO you cant update the database from the recordset. ADO.NET the data adapter allows you to control how the changes to the dataset are transmitted to the database.</p>
<p><strong><span style="font-family:Verdana;">On order to get assembly info which namespace we should import?</span></strong><br />
System.Reflection Namespace</p>
<p><strong><span style="font-family:Verdana;">How do you declare a static variable and what is its lifetime? Give an example.</span></strong><br />
Answer1<br />
static int Myint–The life time is during the entire application.<br />
br&amp;gt; Answer2<br />
The static modifier is used to declare a static member, which belongs to the type itself rather than to a specific object. The static modifier can be used with fields, methods, properties, operators, events and constructors, but cannot be used with indexers, destructors, or types. In C#, the static keyword indicates a class variable. In VB, the equivalent keyword is Shared. Its scoped to the class in which it occurs.</p>
<p>Example<br />
a. Static int var //in c#.net<br />
b. static void Time( ) //in c#.net</p>
<p><strong><span style="font-family:Verdana;">How do you get records number from 5 to 15 in a dataset of 100 records? Write code.</span></strong><br />
Answer1<br />
DataSet ds1=new DataSet(); String strCon=”data source=IBM-6BC8A0DACEF;initial catalog=pubs;integrated security=SSPI;persist” +” security info=False;user<br />
id=sa;workstation id=IBM-6BC8A0DACEF;packet size=4096?;<br />
String strCom1=”SELECT * FROM employee”;<br />
SqlDataAdapter sqlDa1=new SqlDataAdapter(strCom1,strCon);<br />
ds1.Tables.Add(”employee”);<br />
sqlDa1.Fill(ds1,40,50,ds1.Tables[”employee”].TableName);<br />
DataGrid dg1.DataSource=ds1.Tables[”employee”].DefaultView;<br />
dg1.DataBind();</p>
<p>Answer2<br />
OleDbConnection1.Open()<br />
OleDbDataAdapter1.Fill(DataSet21, 5, 15, “tab”)<br />
This will fill the dataset with the records starting at 5 to 15<br />
.NET Database interview questions</p>
<p><strong><span style="font-family:Verdana;">How do you call and execute a Stored Procedure in.NET? Give an example.</span></strong><br />
Answer1<br />
ds1=new DataSet();<br />
sqlCon1=new SqlConnection(connectionstring);<br />
String strCom1=”byroyalty”;<br />
sqlCom1=new SqlCommand(strCom1,sqlCon1);<br />
sqlCom1.CommandType=CommandType.StoredProcedure;<br />
sqlDa1=new SqlDataAdapter(sqlCom1);<br />
SqlParameter myPar=new SqlParameter(”@percentage”,SqlDbType.Int);<br />
sqlCom1.Parameters.Add (myPar);<br />
myPar.Value=40;<br />
sqlDa1.Fill(ds1);<br />
dg1.DataSource=ds1;<br />
dg1.DataBind();</p>
<p>Answer2<br />
Yes<br />
Dim cn as new OleDbConnection ( “Provider=Microsoft.Jet.OLEDB.4.0;”+ _<br />
“Data Source=C:\Documents and Settings\User\My Documents\Visual Studio Projects\1209\db1.mdb”+ _<br />
“User ID=Admin;”+ _<br />
“Password=;”);<br />
Dim cmd As New OleDbCommand(”Products”, cn)<br />
cmd.CommandType = CommandType.StoredProcedure<br />
Dim da As New OleDataAdapter(cmd)<br />
Dim ds As New DataSet()<br />
da.Fill(ds, “Products”)<br />
DataGrid1.DataSource = ds.Tables(”Products”)</p>
<p><strong><span style="font-family:Verdana;">What is the maximum length of a varchar in SQL Server?</span></strong><br />
Answer1<br />
VARCHAR[(n)]<br />
Null-terminated Unicode character string of length n,<br />
with a maximum of 255 characters. If n is not supplied, then 1 is assumed.</p>
<p>Answer2<br />
8000</p>
<p>Answer3<br />
The business logic is the aspx.cs or the aspx.vb where the code is being written. The presentation logic is done with .aspx extention.</p>
<p><strong><span style="font-family:Verdana;">How do you define an integer in SQL Server?</span></strong><br />
We define integer in Sql server as<br />
var_name int</p>
<p><strong><span style="font-family:Verdana;">How do you separate business logic while creating an ASP.NET application?</span></strong><br />
There are two level of asp.net debugging<br />
1. Page level debugging<br />
For this we have to edit the page level debugging enable the trace to true in the line in the html format of the page.<br />
%@ Page Language=”vb” trace=”true”AutoEventWireup=”false” Codebehind=”WebForm1.aspx.vb” Inherits=”WebApplication2.WebForm1?&amp;gt;</p>
<p>2. You can enable the debugging in the application level for this<br />
Edit the following trace value in web.config file<br />
Enable trace enabled=true.</p>
<p>If there is a calendar control to be included in each page of your application, and and we do not intend to use the Microsoft-provided calendar control, how do you develop it? Do you copy and paste the code into each and every page of your application?</p>
<p>Create the Calendar User Control<br />
The control we will create will contain a calendar control and a label which has the corresponding date and time written<br />
Steps are:-</p>
<p>Creating a CalenderControl<br />
1) To begin, open Visual Studio .NET and begin a new C# Windows Control Library.<br />
2) You may name it whatever you like, for this sample the project name will be CalenderControl</p>
<p>Using the Calender Control in a Windows Application<br />
It’s just like adding any other control like a button or a label.<br />
1) First, create a new Windows Application project named: CustomControl.<br />
2) Add a reference to the Calender Control DLL named: CalenderControl.dll.<br />
3) Now you a can customize the Toolbox:<br />
Right-Click the Toolbox&amp;gt; .NET Framework Components&amp;gt; Browse&amp;gt; select the CalenderControl.dll.<br />
4)The Calender Control is now added to the Toolbox and can be inserted in Windows Form as any other control. The control itself will take care of the date display</p>
<p><strong><span style="font-family:Verdana;">How can you deploy an asp.net application ?</span></strong><br />
You can deploy an ASP.NET Web application using any one of the following three deployment options.<br />
a) Deployment using VS.NET installer<br />
b) Using the Copy Project option in VS .NET<br />
c) XCOPY Deployment</p>
<p><strong><span style="font-family:Verdana;">Explain similarities and differences between Java and.NET?</span></strong><br />
Comparing Java and .NET is comparing apples and oranges. Either the question needs to be to compare Java and C# or J2EE and .NET.</p>
<p><strong><span style="font-family:Verdana;">What are the XML files that are important in developing an ASP.NET application?</span></strong><br />
The XML file necessary for the for developing an asp.net application is Web.config</p>
<p><strong><span style="font-family:Verdana;">Specify the best ways to store variables so that we can access them in various pages of ASP.NET application?</span></strong><br />
Declare the variables in Global.aspx</p>
<p><strong><span style="font-family:Verdana;">How many objects are there in ASP?</span></strong><br />
Answer1<br />
8 objects, they are request,response, server,application,session,file, dictionary, textstream.</p>
<p>Answer2<br />
There are 6 objects in ASP.net<br />
a) Server<br />
b) Session<br />
c) Application<br />
d) ObjectContext<br />
e) Response<br />
f) Request</p>
<p><strong><span style="font-family:Verdana;">Which DLL file is needed to be registered for ASP?</span></strong><br />
The dll needed for the ASP.net is SYSTEM.WEB.dll</p>
<p><strong><span style="font-family:Verdana;">Is there any inbuilt paging (for example shoping cart, which will show next 10 records without refreshing) in ASP? How will you do pating?</span></strong><br />
Use DataGrid control which has in-built paging features for the purpose.</p>
<p><strong><span style="font-family:Verdana;">What does Server.MapPath do?</span></strong><br />
Answer1<br />
srver.mappath() maps the path given in the argument to the server’s physical path.</p>
<p>Answer2<br />
It returns the complete(absolute) path of the file used in parameter.</p>
<p>Answer3<br />
It returns a string containing the physical path in the server’s file system that corresponds to the virtual or relative path specified by the Path argument.</p>
<p><strong><span style="font-family:Verdana;">Name atleast three methods of response object other than Redirect.</span></strong><br />
Answer1<br />
a) Response.Clear( )<br />
Clears the content of the current output stream.<br />
b) Response.Close( )<br />
Closes the network socket for the current response.<br />
c) Response.End( )<br />
Stops processing the current request and sends all buffered content to the client immediately.</p>
<p>Answer2<br />
methods of Response is Redirect a. Transfer</p>
<p><strong><span style="font-family:Verdana;">Name atleast two methods of response object other than Transfer.</span></strong><br />
a) Response.ClearContent( )<br />
Clears the content of the current output stream.<br />
b) Response.ClearHeaders( )<br />
Clears the HTTP headers from the current output stream.</p>
<p><strong><span style="font-family:Verdana;">What is State?</span></strong><br />
It is the property of the web forms.<br />
ASP.NET provides four types of state:<br />
Application state<br />
Session state<br />
Cookie state<br />
View state.</p>
<p><strong><span style="font-family:Verdana;">Explain differences between ADO and DAO.</span></strong><br />
dao- can access only access database<br />
ado- can access any databases</p>
<p><strong><span style="font-family:Verdana;">How many types of cookies are there?</span></strong><br />
2 types, persistant and impersistant.</p>
<p><strong><span style="font-family:Verdana;">How many types of cookies are there?</span></strong><br />
Answer1<br />
Two type of cookeies.<br />
a) single valued eg request.cookies(”UserName”).value=”Mahesh”<br />
b)Multivalued cookies. These are used in the way collections are used.<br />
e.g.<br />
request.cookies(”CookiName”)(”UserName”)=”Mahesh”<br />
request.cookies(”CookiName”)(”UserID”)=”ABC003?<br />
rember no value method in multivalued cooki</p>
<p>Answer2<br />
There are two types of cookies:<br />
Session cookies<br />
Persistent cookies</p>
<p><strong><span style="font-family:Verdana;">Tell few steps for optimizing (for speed and resource) ASP page/application.</span></strong><br />
Avoid mixing html code with asp code</p>
<p><strong><span style="font-family:Verdana;">Which command using Query Analyzer will give you the version of SQL Server and Operating System?</span></strong><br />
@@VERSION<br />
Returns version, processor architecture, build date, and operating system for the current installation of SQL Server.</p>
<p><strong><span style="font-family:Verdana;">How to find the SQL server version from Query Analyser</span></strong><br />
Answer1<br />
To determine which version of Microsoft SQL Server 2005 is running, connect to SQL Server 2005 by using SQL Server Management Studio, and then run the following Transact-SQL statement:<br />
SELECT SERVERPROPERTY(’productversion’), SERVERPROPERTY (’productlevel’), SERVERPROPERTY (’edition’)<br />
The results are:<br />
• The product version (for example, “9.00.1399.06?)<br />
. • The product level (for example, “RTM”).<br />
• The edition (for example, “Enterprise Edition”).<br />
For example, the result looks similar to:<br />
9.00.1399.06 RTM Enterprise Edition</p>
<p><strong><span style="font-family:Verdana;">How to determine which version of SQL Server 2000 is running</span></strong><br />
To determine which version of SQL Server 2000 is running, connect to SQL Server 2000 by using Query Analyzer, and then run the following code:<br />
SELECT SERVERPROPERTY(’productversion’), SERVERPROPERTY (’productlevel’), SERVERPROPERTY (’edition’)<br />
The results are:<br />
• The product version (for example, 8.00.534).<br />
• The product level (for example, “RTM” or “SP2?).<br />
• The edition (for example, “Standard Edition”). For example, the result looks similar to<br />
:<br />
8.00.534 RTM Standard Edition</p>
<p>Answer2<br />
One can also use SELECT @@Version where the result would look like<br />
Microsoft SQL Server 2005 &#8211; 9.00.1399.06 (Intel X86)<br />
Oct 14 2005 00:33:37<br />
Copyright (c) 1988-2005 Microsoft Corporation<br />
Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)</p>
<p><strong><span style="font-family:Verdana;">Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table.</span></strong><br />
Answer1.<br />
a. Select count(*) from table1<br />
b. SELECT object_name(id) ,rowcnt FROM sysindexes WHERE indid IN (1,0) AND OBJECTPROPERTY(id, ‘IsUserTable’) = 1<br />
c. exec sp_table_validation @table = ‘authors’</p>
<p><span style="font-size:9pt;color:#666b71;font-family:Verdana;">Answer2.<br />
SELECT count( * ) as totalrecords FROM employee<br />
This will display total records under the name totalrecords in the table employee<br />
use COUNT_BIG<br />
Returns the number of items in a group.<br />
@@ROWCOUNT<br />
Returns the number of rows affected by the last statement.<br />
Use this statement after an SQL select * statement, to retrieve the total number of rows in the table</p>
<p></span></span></p>
<p> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="background:white;line-height:12pt;margin:0;"><strong><span style="font-size:9pt;color:#666b71;font-family:Verdana;">To test a Web Service you must create a windows application or web application to consume this service? It is True/False?</span></strong><span style="font-size:9pt;color:#666b71;font-family:Verdana;"><br />
FALSE<strong><span style="font-family:Verdana;">How many classes can a single.NET DLL contain?</span></strong><br />
Answer1:<br />
As many</p>
<p>Answer2:<br />
One or more</p>
<p><strong><span style="font-family:Verdana;">What are good ADO.NET object(s) to replace the ADO Recordset object?</span></strong><br />
The differences includes<br />
In ADO, the in-memory representation of data is the recordset.<br />
In ADO.net, it is the dataset<br />
A recordset looks like a single table in ADO<br />
In contrast, a dataset is a collection of one or more tables in ADO.net<br />
ADO is designed primarily for connected access<br />
ADO.net the disconnected access to the database is used<br />
In ADO you communicate with the database by making calls to an OLE DB provider.<br />
In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.<br />
In ADO you cant update the database from the recordset. ADO.NET the data adapter allows you to control how the changes to the dataset are transmitted to the database.</p>
<p><strong><span style="font-family:Verdana;">On order to get assembly info which namespace we should import?</span></strong><br />
System.Reflection Namespace</p>
<p><strong><span style="font-family:Verdana;">How do you declare a static variable and what is its lifetime? Give an example.</span></strong><br />
Answer1<br />
static int Myint–The life time is during the entire application.<br />
br&amp;gt; Answer2<br />
The static modifier is used to declare a static member, which belongs to the type itself rather than to a specific object. The static modifier can be used with fields, methods, properties, operators, events and constructors, but cannot be used with indexers, destructors, or types. In C#, the static keyword indicates a class variable. In VB, the equivalent keyword is Shared. Its scoped to the class in which it occurs.</p>
<p>Example<br />
a. Static int var //in c#.net<br />
b. static void Time( ) //in c#.net</p>
<p><strong><span style="font-family:Verdana;">How do you get records number from 5 to 15 in a dataset of 100 records? Write code.</span></strong><br />
Answer1<br />
DataSet ds1=new DataSet(); String strCon=”data source=IBM-6BC8A0DACEF;initial catalog=pubs;integrated security=SSPI;persist” +” security info=False;user<br />
id=sa;workstation id=IBM-6BC8A0DACEF;packet size=4096?;<br />
String strCom1=”SELECT * FROM employee”;<br />
SqlDataAdapter sqlDa1=new SqlDataAdapter(strCom1,strCon);<br />
ds1.Tables.Add(”employee”);<br />
sqlDa1.Fill(ds1,40,50,ds1.Tables[”employee”].TableName);<br />
DataGrid dg1.DataSource=ds1.Tables[”employee”].DefaultView;<br />
dg1.DataBind();</p>
<p>Answer2<br />
OleDbConnection1.Open()<br />
OleDbDataAdapter1.Fill(DataSet21, 5, 15, “tab”)<br />
This will fill the dataset with the records starting at 5 to 15<br />
.NET Database interview questions</p>
<p><strong><span style="font-family:Verdana;">How do you call and execute a Stored Procedure in.NET? Give an example.</span></strong><br />
Answer1<br />
ds1=new DataSet();<br />
sqlCon1=new SqlConnection(connectionstring);<br />
String strCom1=”byroyalty”;<br />
sqlCom1=new SqlCommand(strCom1,sqlCon1);<br />
sqlCom1.CommandType=CommandType.StoredProcedure;<br />
sqlDa1=new SqlDataAdapter(sqlCom1);<br />
SqlParameter myPar=new SqlParameter(”@percentage”,SqlDbType.Int);<br />
sqlCom1.Parameters.Add (myPar);<br />
myPar.Value=40;<br />
sqlDa1.Fill(ds1);<br />
dg1.DataSource=ds1;<br />
dg1.DataBind();</p>
<p>Answer2<br />
Yes<br />
Dim cn as new OleDbConnection ( “Provider=Microsoft.Jet.OLEDB.4.0;”+ _<br />
“Data Source=C:\Documents and Settings\User\My Documents\Visual Studio Projects\1209\db1.mdb”+ _<br />
“User ID=Admin;”+ _<br />
“Password=;”);<br />
Dim cmd As New OleDbCommand(”Products”, cn)<br />
cmd.CommandType = CommandType.StoredProcedure<br />
Dim da As New OleDataAdapter(cmd)<br />
Dim ds As New DataSet()<br />
da.Fill(ds, “Products”)<br />
DataGrid1.DataSource = ds.Tables(”Products”)</p>
<p><strong><span style="font-family:Verdana;">What is the maximum length of a varchar in SQL Server?</span></strong><br />
Answer1<br />
VARCHAR[(n)]<br />
Null-terminated Unicode character string of length n,<br />
with a maximum of 255 characters. If n is not supplied, then 1 is assumed.</p>
<p>Answer2<br />
8000</p>
<p>Answer3<br />
The business logic is the aspx.cs or the aspx.vb where the code is being written. The presentation logic is done with .aspx extention.</p>
<p><strong><span style="font-family:Verdana;">How do you define an integer in SQL Server?</span></strong><br />
We define integer in Sql server as<br />
var_name int</p>
<p><strong><span style="font-family:Verdana;">How do you separate business logic while creating an ASP.NET application?</span></strong><br />
There are two level of asp.net debugging<br />
1. Page level debugging<br />
For this we have to edit the page level debugging enable the trace to true in the line in the html format of the page.<br />
%@ Page Language=”vb” trace=”true”AutoEventWireup=”false” Codebehind=”WebForm1.aspx.vb” Inherits=”WebApplication2.WebForm1?&amp;gt;</p>
<p>2. You can enable the debugging in the application level for this<br />
Edit the following trace value in web.config file<br />
Enable trace enabled=true.</p>
<p>If there is a calendar control to be included in each page of your application, and and we do not intend to use the Microsoft-provided calendar control, how do you develop it? Do you copy and paste the code into each and every page of your application?</p>
<p>Create the Calendar User Control<br />
The control we will create will contain a calendar control and a label which has the corresponding date and time written<br />
Steps are:-</p>
<p>Creating a CalenderControl<br />
1) To begin, open Visual Studio .NET and begin a new C# Windows Control Library.<br />
2) You may name it whatever you like, for this sample the project name will be CalenderControl</p>
<p>Using the Calender Control in a Windows Application<br />
It’s just like adding any other control like a button or a label.<br />
1) First, create a new Windows Application project named: CustomControl.<br />
2) Add a reference to the Calender Control DLL named: CalenderControl.dll.<br />
3) Now you a can customize the Toolbox:<br />
Right-Click the Toolbox&amp;gt; .NET Framework Components&amp;gt; Browse&amp;gt; select the CalenderControl.dll.<br />
4)The Calender Control is now added to the Toolbox and can be inserted in Windows Form as any other control. The control itself will take care of the date display</p>
<p><strong><span style="font-family:Verdana;">How can you deploy an asp.net application ?</span></strong><br />
You can deploy an ASP.NET Web application using any one of the following three deployment options.<br />
a) Deployment using VS.NET installer<br />
b) Using the Copy Project option in VS .NET<br />
c) XCOPY Deployment</p>
<p><strong><span style="font-family:Verdana;">Explain similarities and differences between Java and.NET?</span></strong><br />
Comparing Java and .NET is comparing apples and oranges. Either the question needs to be to compare Java and C# or J2EE and .NET.</p>
<p><strong><span style="font-family:Verdana;">What are the XML files that are important in developing an ASP.NET application?</span></strong><br />
The XML file necessary for the for developing an asp.net application is Web.config</p>
<p><strong><span style="font-family:Verdana;">Specify the best ways to store variables so that we can access them in various pages of ASP.NET application?</span></strong><br />
Declare the variables in Global.aspx</p>
<p><strong><span style="font-family:Verdana;">How many objects are there in ASP?</span></strong><br />
Answer1<br />
8 objects, they are request,response, server,application,session,file, dictionary, textstream.</p>
<p>Answer2<br />
There are 6 objects in ASP.net<br />
a) Server<br />
b) Session<br />
c) Application<br />
d) ObjectContext<br />
e) Response<br />
f) Request</p>
<p><strong><span style="font-family:Verdana;">Which DLL file is needed to be registered for ASP?</span></strong><br />
The dll needed for the ASP.net is SYSTEM.WEB.dll</p>
<p><strong><span style="font-family:Verdana;">Is there any inbuilt paging (for example shoping cart, which will show next 10 records without refreshing) in ASP? How will you do pating?</span></strong><br />
Use DataGrid control which has in-built paging features for the purpose.</p>
<p><strong><span style="font-family:Verdana;">What does Server.MapPath do?</span></strong><br />
Answer1<br />
srver.mappath() maps the path given in the argument to the server’s physical path.</p>
<p>Answer2<br />
It returns the complete(absolute) path of the file used in parameter.</p>
<p>Answer3<br />
It returns a string containing the physical path in the server’s file system that corresponds to the virtual or relative path specified by the Path argument.</p>
<p><strong><span style="font-family:Verdana;">Name atleast three methods of response object other than Redirect.</span></strong><br />
Answer1<br />
a) Response.Clear( )<br />
Clears the content of the current output stream.<br />
b) Response.Close( )<br />
Closes the network socket for the current response.<br />
c) Response.End( )<br />
Stops processing the current request and sends all buffered content to the client immediately.</p>
<p>Answer2<br />
methods of Response is Redirect a. Transfer</p>
<p><strong><span style="font-family:Verdana;">Name atleast two methods of response object other than Transfer.</span></strong><br />
a) Response.ClearContent( )<br />
Clears the content of the current output stream.<br />
b) Response.ClearHeaders( )<br />
Clears the HTTP headers from the current output stream.</p>
<p><strong><span style="font-family:Verdana;">What is State?</span></strong><br />
It is the property of the web forms.<br />
ASP.NET provides four types of state:<br />
Application state<br />
Session state<br />
Cookie state<br />
View state.</p>
<p><strong><span style="font-family:Verdana;">Explain differences between ADO and DAO.</span></strong><br />
dao- can access only access database<br />
ado- can access any databases</p>
<p><strong><span style="font-family:Verdana;">How many types of cookies are there?</span></strong><br />
2 types, persistant and impersistant.</p>
<p><strong><span style="font-family:Verdana;">How many types of cookies are there?</span></strong><br />
Answer1<br />
Two type of cookeies.<br />
a) single valued eg request.cookies(”UserName”).value=”Mahesh”<br />
b)Multivalued cookies. These are used in the way collections are used.<br />
e.g.<br />
request.cookies(”CookiName”)(”UserName”)=”Mahesh”<br />
request.cookies(”CookiName”)(”UserID”)=”ABC003?<br />
rember no value method in multivalued cooki</p>
<p>Answer2<br />
There are two types of cookies:<br />
Session cookies<br />
Persistent cookies</p>
<p><strong><span style="font-family:Verdana;">Tell few steps for optimizing (for speed and resource) ASP page/application.</span></strong><br />
Avoid mixing html code with asp code</p>
<p><strong><span style="font-family:Verdana;">Which command using Query Analyzer will give you the version of SQL Server and Operating System?</span></strong><br />
@@VERSION<br />
Returns version, processor architecture, build date, and operating system for the current installation of SQL Server.</p>
<p><strong><span style="font-family:Verdana;">How to find the SQL server version from Query Analyser</span></strong><br />
Answer1<br />
To determine which version of Microsoft SQL Server 2005 is running, connect to SQL Server 2005 by using SQL Server Management Studio, and then run the following Transact-SQL statement:<br />
SELECT SERVERPROPERTY(’productversion’), SERVERPROPERTY (’productlevel’), SERVERPROPERTY (’edition’)<br />
The results are:<br />
• The product version (for example, “9.00.1399.06?)<br />
. • The product level (for example, “RTM”).<br />
• The edition (for example, “Enterprise Edition”).<br />
For example, the result looks similar to:<br />
9.00.1399.06 RTM Enterprise Edition</p>
<p><strong><span style="font-family:Verdana;">How to determine which version of SQL Server 2000 is running</span></strong><br />
To determine which version of SQL Server 2000 is running, connect to SQL Server 2000 by using Query Analyzer, and then run the following code:<br />
SELECT SERVERPROPERTY(’productversion’), SERVERPROPERTY (’productlevel’), SERVERPROPERTY (’edition’)<br />
The results are:<br />
• The product version (for example, 8.00.534).<br />
• The product level (for example, “RTM” or “SP2?).<br />
• The edition (for example, “Standard Edition”). For example, the result looks similar to<br />
:<br />
8.00.534 RTM Standard Edition</p>
<p>Answer2<br />
One can also use SELECT @@Version where the result would look like<br />
Microsoft SQL Server 2005 &#8211; 9.00.1399.06 (Intel X86)<br />
Oct 14 2005 00:33:37<br />
Copyright (c) 1988-2005 Microsoft Corporation<br />
Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)</p>
<p><strong><span style="font-family:Verdana;">Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table.</span></strong><br />
Answer1.<br />
a. Select count(*) from table1<br />
b. SELECT object_name(id) ,rowcnt FROM sysindexes WHERE indid IN (1,0) AND OBJECTPROPERTY(id, ‘IsUserTable’) = 1<br />
c. exec sp_table_validation @table = ‘authors’</p>
<p><span style="font-size:9pt;color:#666b71;font-family:Verdana;">Answer2.<br />
SELECT count( * ) as totalrecords FROM employee<br />
This will display total records under the name totalrecords in the table employee<br />
use COUNT_BIG<br />
Returns the number of items in a group.<br />
@@ROWCOUNT<br />
Returns the number of rows affected by the last statement.<br />
Use this statement after an SQL select * statement, to retrieve the total number of rows in the table</p>
<p></span></span></p>
<p> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/vinayhatwal.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/vinayhatwal.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vinayhatwal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vinayhatwal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vinayhatwal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vinayhatwal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vinayhatwal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vinayhatwal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vinayhatwal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vinayhatwal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vinayhatwal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vinayhatwal.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vinayhatwal.wordpress.com&blog=4320862&post=8&subd=vinayhatwal&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://vinayhatwal.wordpress.com/2008/07/25/adonet-interview-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/30134ff30180ffc15825d15c005dbce5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vinayhatwal</media:title>
		</media:content>
	</item>
	</channel>
</rss>