Thursday, 25 December 2014

Few more interview Questions :

Asp.net :
RowDataBound.
what is Session ? Seesion[var] -- what does this mean..?
how do you store value inside a session.
HttpHandler -- Example
HttpModule -- Example
EnableSessionState -- pagewise and for the entire site.
Webfarms :  http://www.codeproject.com/Articles/114910/What-is-the-difference-between-Web-Farm-and-Web-Ga
webgarden :  http://www.codeproject.com/Articles/114910/What-is-the-difference-between-Web-Farm-and-Web-Ga
Windows authentication
FormsAuthentication
ViewState can store an object ? yes http://msdn.microsoft.com/en-us/library/ms178198(v=vs.85).aspx
Application Pool -- can one app pool have more than one application. What does this pool contain.
worker process
Threads
Find Control in the page.
FindControl of a master page
How will yoiu get the control of a master page inside your pageload
Can you create a server control?
Causes Validation
Dfference between a server control and user control.
In user control how too acces the page controls.
session state -- different modes.
IF you dont want to use the session in one particular page what will you do.
what happens when web.config is modified and the user is already logged in.
how many worker processa are there in Application pool :only 1

C# :
const -- uses
readonly -- uses
abstract class
interface
method overriding -- example. where to use when
method overloading -- example.where to use when
method hiding and example.where to use when
IEnumerable and IQueryable.[lazy loading] http://www.codeproject.com/Articles/732425/IEnumerable-Vs-IQueryable
why do we need abstract class
can a class have virtual methods.
string
how will you find the number of  vowels in a string. [http://stackoverflow.com/questions/18109890/c-sharp-count-vowels]
Factory pattern -- where do we use it.
Singleton-- where do we use it
can we instantiate an abstract class.
If not the what does classA a = new B(); will say ?
What are delegates 
What are multicast delegates.
If an exception occurs in multicastdelegates will the next delegates execute..?
what is an event..? 
xml serialisation
datacontract serialisation
Fault Exception.
why do we need datacontract serialisation
what is messagecontract.
What is shallow copy and deep copy
Memberwise clone 
how can you copy the data of an object into another object. http://msdn.microsoft.com/en-us/library/system.object.memberwiseclone(v=vs.110).aspx;
what is reflection
some example of the reflection in Page class.
What is serialization ?http://msdn.microsoft.com/en-IN/library/ms233843.aspx
what is the difference between properties and methods.?when to choose what ? http://msdn.microsoft.com/en-us/library/vstudio/ms229054(v=vs.100).aspx

SQL Server :
What is a Function?
What is a Stored procedure?
Different types of functions : Scalar and Table valued functions?
How to remove the duplicate entries in the table.?
Ans: http://www.besttechtools.com/articles/article/sql-query-to-delete-duplicate-rows
What is a Cursor?
Alternate for a cursor?
Distinct rows in a table without using distinct ?.-- Group by
What is rowcount


JQuery :
Differences Windows.Onload and $.Document.Ready function : Ans:http://www.dotnetbull.com/2013/08/document-ready-vs-window-onload.html
How to get the list of all the divs in a page ?
How to set alternate colors for the divs in the page ?



Tuesday, 23 December 2014

Interview Questions : PART I 

I have consolidated all the interview questions which were asked in the recent times. Just have a quick glance at this list before you go for any interview. This will help you for sure. All the very best !!!


1) Difference bewtween functions and storedprocedures in SQL Server ?
2) Can we update/insert./delete rows in views ?
3) Where is the explain plan in sqlserver ?
4) What is webapi..?
5) What is wcf..?
6) Which one is used where.?
7) MVC and webforms differences
8) What is dependency injection ?
9) What is REST?
10) jquery ajax ? how to handle success and errors ? 
11) How do you throw exceptions in Jquery?
12) MVC -- explain what are the advantages of using mvc?
13) I have a html table which has 5 rows . i dont have ids for either table or any other contents inside the table.. each row is having a button and a textbox. when click on one button you have to fill the textbox with that row number. How can you do that.
14) How to get the list of divs in the page ?
15) How do you improve the performance of a query in sql server ?
16) Advantage of using char over varchar ?






Monday, 17 November 2014

Interview Questions


1) What is the Advantage of Char over Varchar ..?

Char --  a) Fixed size or length.
              b) Static allocation of memory. 
If you say Char(5) 5 bytes of space is allocated for char. Even if you use only 2 bytes remaining 3 bytes will still be there.
              cIt Stores non unicode characters.

Varchar-- 
              a) Variable size or length
              b) Dynamic memory allocation. 
If you say Varchar(5) and store only 2 bytes. The remaining 3 bytes will not be there.
              c) It stores non unicode characters.

As Char is static memory allocation, it is 50% faster than Varchar.

2) What is the difference between NChar and NVarchar ?

NChar -- Same as Char, except that it stores unicode(double byte) characters.
  By unicode we mean that the characters of different languages like german,chineese which takes 2 bytes.                           
There are some languages which takes 2bytes to store a character like German.

NVarchar -- Same as Varchar , except that it stores unicode(double byte) characters.


Thursday, 20 March 2014

How to set the default path for TNSNAMES.ORA

Set TNSNAMES.ORA file path.

Most of the times we end up having mutliple oracle clients when we are working with .net as front end and oracle as the back end.

If you want to work with the UserDefinedDatatypes, then we need to install the ODP.net client.
Depending on the version of the framework , we have to install a different ODP.net. Sometimes we end up in working on multiple versions of framework and we have different ODP.net clients in our systems.

As client will be installed in a different folder. We add up adding tnsnames.ora file inside each client and we dont realise that both the clients should have the same tnsnames.ora file. Because we never know which tnsfile will be picked up by our dotnet framework. If you add a new tns in one file and forgot to add in the other, you will see an exception saying "TNS listener could not be found".

To avoid the confusion here, and to make our job easy, we can set the path of the TnsNames.Ora file in the environment Variables. So that both the oracle and the .netframework will refer to the same path.

How to set the TNSNAMES.ORA Path

Step1: 
Go to StartMenu -->
control Panel --> System


Step 2:
On the left hand side you can see the Advanced System Settings



Step 3:
Click on Advanced System Settings

Step4 : 
Click the Environment Variables Button




Step5 : You can see Two boxes . Go to the second one.

Step6 : Click on New

Step 7 : A new window opens .
Give the Variable name as TNS_ADMIN
Give the Variable Value as "Path of the OracleClient which contains tnsnames.ora file"
for ex : C:\app\Oracle\product\11.2.0\client_1\Network\Admin

Step 8: Click OK.


Now the TNSFile Path is set. There is no need for you to update in all the oracle clients whenever you need to add a new tns . 

Happy Coding !!!!!