Skip to main content

Posts

Showing posts with the label Queries

What are different types of joins in SQL?

Answer: INNER JOIN Inner join shows matches only when they exist in both tables. Example in the below SQL there are two tables Customers and Orders and the inner join in made on Customers.Customerid and Orders.Customerid. So this SQL will only give you result with customers who have orders. If the customer does not have order, it will not display that record. SELECT Customers.*, Orders.* FROM Customers INNER JOIN Orders ON Customers.CustomerID =Orders.CustomerID LEFT OUTER JOIN Left join will display all records in left table of the SQL statement. In SQL below customers with or without orders will be displayed. Order data for customers without orders appears as NULL values. For example, you want to determine the amount ordered by each customer and you need to see who has not ordered anything as well. You can also see the LEFT OUTER JOIN as a mirror image of the RIGHT OUTER JOIN (Is covered in the next section) if you switch the side of each table. SELECT Customers.*, Orders.* FROM Cust...

Interview question

What is Microsoft SharePoint Portal Server? SharePoint Portal Server is a portal server that connects people, teams, and knowledge across business processes. SharePoint Portal Server integrates information from various systems into one secure solution through single sign-on and enterprise application integration capabilities. It provides flexible deployment and management tools, and facilitates end-to-end collaboration through data aggregation, organization, and searching. SharePoint Portal Server also enables users to quickly find relevant information through customization and personalization of portal content and layout as well as through audience targeting. What is Microsoft Windows SharePoint Services? Windows SharePoint Services is the solution that enables you to create Web sites for information sharing and document collaboration. Windows SharePoint Services " a key piece of the information worker infrastructure delivered in Microsoft Windows Server 2003 " provides addi...

Can you explain the concept of triggers in ‘UpdatePanel’ control?

Answer: Triggers are child tags for ‘UpdatePanel’ tag. Many times we would like to update the panel when some event occurs or a value change on a control. This can be achieved by using triggers. There are two types of triggers ‘ControlEventTrigger’ and ‘ControlValueTrigger’. So let’s first understand ‘ControlEventTrigger’. Using ‘ControlEventTrigger’ we define on which control and at which event the update panel should refresh. Below is a simple code snippet for ‘ControlEventTrigger’. ‘ControlEventTrigger’ are defined using ‘ ’ tag. We have numbered the code snippet below so let’s understand the same with numbers:- • 1 -> We need to define ‘ControlEventTrigger’ using ‘ ’ tag. • 2 -> In this sample we will link trigger in ‘UpdatePanel1’ with the click event of ‘Button1’. • 3 -> In the ‘ ’ tag we need to define the control and event using ‘ControlId’ and ‘EventName’ properties respectively. So now when the button click event happens ‘UpdatePanel1’ is refreshed. Figure 18.12: - ...

can a structure used in a class if yes then how.

This example shows that when a struct is passed to a method, a copy of the struct is passed, but when a class instance is passed, a reference is passed. // struct2.cs using System; class TheClass { public int x; } struct TheStruct { public int x; } class TestClass { public static void structtaker(TheStruct s) { s.x = 5; } public static void classtaker(TheClass c) { c.x = 5; } public static void Main() { TheStruct a = new TheStruct(); TheClass b = new TheClass(); a.x = 1; b.x = 1; structtaker(a); classtaker(b); Console.WriteLine("a.x = {0}", a.x); Console.WriteLine("b.x = {0}", b.x); } } Output a.x = 1 b.x = 5 From MSDN:

What is early binding and late binding

1.Early binding - Assigning values to variables during design time or exposing object model at design time. Late Binding - Late binding has the same effect as early binding. The difference is that you bind the object library in code at run-time 2.From a program point of view during early binding the function call is resolved at compile time. In case of late binding the function call is resolved at run time with the superclass reference object. It calls the function of that subclass whose object is being referred by the superclass reference object. 3.Early binding - Assigning values to variables during design time or exposing object model at design time. Late Binding - Late binding has the same effect as early binding. The difference is that you bind the object library in code at run-time

syntax for writing private method in a interface

An interface cannot have private methods. All the member declarations inside interface are implicitly public. we cnt write private methods in an interface.as we have to inherit that method its by default on public scope By default interface is public.Interface is accessed by another class it should be public.so we cant write it as a private.

what is the difference between interface and abstraction?

1) In Interface we can give only declarations not definitions but in abstraction we can hv definitions also. 2) In an Abstraction we must hv at least one abstract function. 3) Abstraction can not be instantiate . 4) In Interfaces we can not assign access identifier. 5) A class can implement 2 interfaces but can inherit only one Abstract function. interface: in interface,all methods must b abstract,by default all members are PUBLIC,cant b implimented infact derived class impliments its methods interface can use multiple interface abstract: it is just like interface,not imolimented by itself,only derived class can impliment abstract class or abstract methods,abstract methods can b private unlike interface,cant allow multiple inheritance In Interface, all the member functions are abstract implicitly so it is imp. to define all fn. declared inside Interface. Moreover, we cann't define a fn. or we cann't declare any member variable in an Interface. Also, we cann't declare or...

What?s a delegate?

A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers. 1.Delegates in dynamically change the reference to the menthod in a class. 2.Delegate is a reference type variable.