<?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"
	>

<channel>
	<title>Dot Net Tutorials</title>
	<atom:link href="http://www.dotnettutorial.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnettutorial.info</link>
	<description></description>
	<pubDate>Sat, 03 Jan 2009 11:39:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>SQL Interview Questions</title>
		<link>http://www.dotnettutorial.info/sql-interview-questions/38/</link>
		<comments>http://www.dotnettutorial.info/sql-interview-questions/38/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 12:22:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[SQL Server Interview Questions]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[interview questions]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[sql]]></category>

		<category><![CDATA[sql 2005]]></category>

		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=38</guid>
		<description><![CDATA[What&#8217;s the difference between a primary key and a unique key?
Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn&#8217;t allow [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What&#8217;s the difference between a primary key and a unique key?<br />
</strong>Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn&#8217;t allow NULLs, but unique key allows one NULL only.</p>
<p><strong>How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables?<br />
</strong>One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships.<br />
One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships.<br />
Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.</p>
<p><strong>Define candidate key, alternate key, composite key?</strong><br />
A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.</p>
<p>A key formed by combining at least two or more columns is called composite key. </p>
<p><strong>What are defaults? Is there a column to which a default can&#8217;t be bound?<br />
</strong>A default is a value that will be used by a column, if no value is supplied to that column while inserting data. IDENTITY columns and timestamp columns can&#8217;t have defaults bound to them.</p>
<p><strong>What is a transaction and what are ACID properties?<br />
</strong>A transaction is a logical unit of work in which, all the steps must be performed or none. ACID stands for Atomicity, Consistency, Isolation, Durability. These are the properties of a transaction.</p>
<p><strong>What&#8217;s the maximum size of a row?<br />
</strong>8060 bytes.</p>
<p><strong>What&#8217;s the difference between DELETE TABLE and TRUNCATE TABLE commands?</strong><br />
DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won&#8217;t log the deletion of each row, instead it logs the deallocation of the data pages of the table, which makes it faster. Of course, TRUNCATE TABLE can be rolled back.</p>
<p><strong>What are user defined datatypes and when you should go for them?</strong><br />
User defined datatypes let you extend the base SQL Server datatypes by providing a descriptive name, and format to the database. Take for example, in your database, there is a column called Flight_Num which appears in many tables. In all these tables it should be varchar(8). In this case you could create a user defined datatype called Flight_num_type of varchar(8) and use it across all your tables.</p>
<p><strong>What is bit datatype and what&#8217;s the information that can be stored inside a bit column?</strong><br />
Bit datatype is used to store boolean information like 1 or 0 (true or false). Until SQL Server 6.5 bit datatype could hold either a 1 or 0 and there was no support for NULL. But from SQL Server 7.0 onwards, bit datatype can represent a third state, which is NULL.</p>
<p><strong>What is OLAP?</strong><br />
On-Line Analytical Processing (OLAP) and the advantages of analysis using multi-dimensional, pre-aggregated data. Maybe you&#8217;ve even thought about creating your own multidimensional cubes to give your end users true ad hoc capabilities, including the creation of calculated measures/KPIs. If you&#8217;ve relegated that task to the back burner because it was too complex, you&#8217;ll be happy to know that SQL 2005 has made the process easier.</p>
<p><strong>Why Use OLAP?<br />
</strong>OLAP is useful because it provides fast and interactive access to aggregated data and the ability to drill down to detail. OLAP lets users view and interrogate large volumes of data (often millions of rows) by pre-aggregating the information. It puts the data needed to make strategic decisions directly into the hands of the decision makers, not only through pre-defined queries and reports, but also because it gives end users the ability to perform their own ad hoc queries, minimizing users&#8217; dependence on database developers.</p>
<p><strong>What&#8217;s the Secret?<br />
</strong>OLAP leverages existing data from a relational schema or data warehouse (data source) by placing key performance indicators (measures) into context (dimensions). Once processed into a multidimensional database (cube), all of the measures are pre-aggregated, which makes data retrieval significantly faster. The processed cube can then be made available to business users who can browse the data using a variety of tools, making ad hoc analysis an interactive and analytical process rather than a development effort. SQL Server 2005&#8217;s BI Workbench substantially improves upon SQL Server 2000&#8217;s BI capability.</p>
<p><strong>What are constraints? Explain different types of constraints?<br />
</strong>Constraints enable the RDBMS enforce the integrity of the database automatically, without needing you to create triggers, rule or defaults.<br />
Types of constraints: NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY.</p>
<p><strong>What is an index? What are the types of indexes? How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?<br />
</strong>Indexes in SQL Server are similar to the indexes in books. They help SQL Server retrieve the data quicker.<br />
Indexes are of two types. Clustered indexes and non-clustered indexes. When you craete a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table. Non-clustered indexes have their own storage separate from the table data storage. Non-clustered indexes are stored as B-tree structures (so do clustered indexes), with the leaf level nodes having the index key and it&#8217;s row locater. The row located could be the RID or the Clustered index key, depending up on the absence or presence of clustered index on the table.<br />
If you create an index on each column of a table, it improves the query performance, as the query optimizer can choose from all the existing indexes to come up with an efficient execution plan. At the same time, data modification operations (such as INSERT, UPDATE, DELETE) will become slow, as every time data changes in the table, all the indexes need to be updated. Another disadvantage is that, indexes need disk space, the more indexes you have, more disk space is used.</p>
<p><strong>What is RAID and what are different types of RAID configurations?</strong><br />
RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance. MSDN has some information about RAID levels and for detailed information, check out the RAID advisory board&#8217;s homepage.</p>
<p><strong>What are the steps you will take to improve performance of a poor performing query?</strong><br />
There could be a lot of reasons behind the poor performance of a query. But some general issues that you could talk about would be: No indexes, table scans, missing or out of date statistics, blocking, excess recompilations of stored procedures, procedures and triggers without SET NOCOUNT ON, poorly written query with unnecessarily complicated joins, too much normalization, excess usage of cursors and temporary tables.<br />
Some of the tools/ways that help you troubleshooting performance problems are: SET SHOWPLAN_ALL ON, SET SHOWPLAN_TEXT ON, SET STATISTICS IO ON, SQL Server Profiler, Windows NT /2000 Performance monitor, Graphical execution plan in Query Analyzer.</p>
<p><strong>What are the steps you will take, if you are tasked with securing an SQL Server?<br />
</strong>Here are some things you could talk about: Preferring NT authentication, using server, databse and application roles to control access to the data, securing the physical database files using NTFS permissions, using an unguessable SA password, restricting physical access to the SQL Server, renaming the Administrator account on the SQL Server computer, disabling the Guest account, enabling auditing, using multiprotocol encryption, setting up SSL, setting up firewalls, isolating SQL Server from the web server etc.</p>
<p><strong>What is a deadlock and what is a live lock? How will you go about resolving deadlocks?</strong><br />
Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to acquire a lock on the other&#8217;s piece. Each process  would wait indefinitely for the other to release the lock, unless one of the user processes is terminated. SQL Server detects deadlocks and terminates one user&#8217;s process.<br />
A livelock is one, where a  request for an exclusive lock is repeatedly denied because a series of overlapping shared locks keeps interfering. SQL Server detects the situation after four denials and refuses further shared locks. A livelock also occurs when read transactions monopolize a table or page, forcing a write transaction to wait indefinitely.</p>
<p><strong>What is blocking and how would you troubleshoot it?<br />
</strong>Blocking happens when one connection from an application holds a lock and a second connection requires a conflicting lock type. This forces the second connection to wait, blocked on the first.</p>
<p><strong>Explain CREATE DATABASE syntax?<br />
</strong>Many of us are used to creating databases from the Enterprise Manager or by just issuing the command: CREATE DATABAE MyDB. But what if you have to create a database with two filegroups, one on drive C and the other on drive D with log on drive E with an initial size of 600 MB and with a growth factor of 15%? That&#8217;s why being a DBA you should be familiar with the CREATE DATABASE syntax.</p>
<p><strong>How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?</strong><br />
SQL Server can be started from command line, using the SQLSERVR.EXE. This EXE has some very important parameters with which a DBA should be familiar with -m is used for starting SQL Server in single user mode and -f is used to start the SQL Server in minimal confuguration mode.</p>
<p><strong>As a part of your job, what are the DBCC commands that you commonly use for database maintenance?</strong><br />
DBCC CHECKDB, DBCC CHECKTABLE, DBCC CHECKCATALOG, DBCC CHECKALLOC, DBCC SHOWCONTIG, DBCC SHRINKDATABASE, DBCC SHRINKFILE etc. But there are a whole load of DBCC commands which are very useful for DBAs.</p>
<p><strong>What are statistics, under what circumstances they go out of date, how do you update them?</strong><br />
Statistics determine the selectivity of the indexes. If an indexed column has unique values then the selectivity of that index is more, as opposed to an index with non-unique values. Query optimizer uses these indexes in determining whether to choose an index or not while executing a query.<br />
Some situations under which you should update statistics:<br />
1) If there is significant change in the key values in the index<br />
2) If a large amount of data in an indexed column has been added, changed, or removed (that is, if the distribution of key values has changed), or the table has been truncated using the TRUNCATE TABLE statement and then repopulated<br />
3) Database is upgraded from a previous version</p>
<p><strong>What are the different ways of moving data/databases between servers and databases in SQL Server?<br />
</strong>There are lots of options available, you have to choose your option depending upon your requirements. Some of the options you have are: BACKUP/RESTORE, dettaching and attaching databases, replication, DTS, BCP, logshipping, INSERT&#8230;SELECT, SELECT&#8230;INTO, creating INSERT scripts to generate data.</p>
<p><strong>Explian different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?</strong><br />
Types of backups you can create in SQL Sever 7.0+ are Full database backup, differential database backup, transaction log backup, filegroup backup.</p>
<p><strong>What is database replicaion? What are the different types of replication you can set up in SQL Server?</strong><br />
Replication is the process of copying/moving data between databases on the same or different servers. SQL Server supports the following types of replication scenarios:</p>
<p>Snapshot replication<br />
Transactional replication (with immediate updating subscribers, with queued updating subscribers)<br />
Merge replication</p>
<p><strong>How to determine the service pack currently installed on SQL Server?</strong><br />
The global variable @@Version stores the build number of the sqlservr.exe, which is used to determine the service pack installed.</p>
<p><strong>What are cursors? Explain different types of cursors?What are the disadvantages of cursors? How can you avoid cursors?</strong><br />
Cursors allow row-by-row prcessing of the resultsets.<br />
Types of cursors: Static, Dynamic, Forward-only, Keyset-driven.</p>
<p><strong>Disadvantages of cursors</strong>: Each time you fetch a row from the cursor, it results in a network roundtrip, where as a normal SELECT query makes only one rowundtrip, however large the resultset is. Cursors are also costly because they require more resources and temporary storage (results in more IO operations). Further, there are restrictions on the SELECT statements that can be used with some types of cursors.<br />
Most of the times, set based operations can be used instead of cursors. Here is an example:</p>
<p>If you have to give a flat hike to your employees using the following criteria:</p>
<p>Salary between 30000 and 40000 &#8212; 5000 hike<br />
Salary between 40000 and 55000 &#8212; 7000 hike<br />
Salary between 55000 and 65000 &#8212; 9000 hike</p>
<p>In this situation many developers tend to use a cursor, determine each employee&#8217;s salary and update his salary according to the above formula. But the same can be achieved by multiple update statements or can be combined in a single UPDATE statement as shown below:</p>
<p>UPDATE tbl_emp SET salary =<br />
CASE WHEN salary BETWEEN 30000 AND 40000 THEN salary + 5000<br />
WHEN salary BETWEEN 40000 AND 55000 THEN salary + 7000<br />
WHEN salary BETWEEN 55000 AND 65000 THEN salary + 10000<br />
END</p>
<p>Another situation in which developers tend to use cursors: You need to call a stored procedure when a column in a particular row meets certain condition. You don&#8217;t have to use cursors for this. This can be achieved using WHILE loop, as long as there is a unique key to identify each row. For examples of using WHILE loop for row by row processing.</p>
<p><strong>Write down the general syntax for a SELECT statements covering all the options?</strong><br />
Here&#8217;s the basic syntax:</p>
<p>SELECT select_list<br />
[INTO new_table_]<br />
FROM table_source<br />
[WHERE search_condition]<br />
[GROUP BY group_by_expression]<br />
[HAVING search_condition]<br />
[ORDER BY order_expression [ASC | DESC] ]</p>
<p><strong>What is a join and explain different types of joins?</strong><br />
Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table.</p>
<p>Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS.</p>
<p><strong>Can you have a nested transaction?</strong><br />
Yes,we can have a nested transaction.</p>
<p><strong>What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?</strong><br />
An extended stored procedure is a function within a DLL (written in a programming language like C, C++ using Open Data Services (ODS) API) that can be called from T-SQL, just the way we call normal stored procedures using the EXEC statement.<br />
Yes, you can instantiate a COM (written in languages like VB, VC++) object from T-SQL by using sp_OACreate stored procedure.</p>
<p><strong>What is the system function to get the current user&#8217;s user id?</strong><br />
USER_ID(). Also check out other system functions like USER_NAME(), SYSTEM_USER, SESSION_USER, CURRENT_USER, USER, SUSER_SID(), HOST_NAME().</p>
<p><strong>What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?<br />
</strong>Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table.<br />
In SQL Server 6.5 you could define only 3 triggers per table, one for INSERT, one for UPDATE and one for DELETE. From SQL Server 7.0 onwards, this restriction is gone, and you could create multiple triggers per each action. But in 7.0 there&#8217;s no way to control the order in which the triggers fire. In SQL Server 2000 you could specify which trigger fires first or fires last using sp_settriggerorder<br />
Triggers can&#8217;t be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined.<br />
Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster.<br />
Till SQL Server 7.0, triggers fire only after the data modification operation happens. So in a way, they are called post triggers. But in SQL Server 2000 you could create pre triggers also.<br />
There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing.</p>
<p><strong>What do you think of this implementation? Can this be implemented better?</strong><br />
Instantiating COM objects is a time consuming process and since you are doing it from within a trigger, it slows down the data insertion process. Same is the case with sending emails from triggers. This scenario can be better implemented by logging all the necessary data into a separate table, and have a job which periodically checks this table and does the needful.</p>
<p><strong>What is a self join? Explain it with an example.</strong><br />
Self join is just like any other join, except that two instances of the same table will be joined in the query. Here is an example: Employees table which contains rows for normal employees as well as managers. So, to find out the managers of all the employees, you need a self join.</p>
<p>CREATE TABLE emp<br />
(<br />
empid int,<br />
mgrid int,<br />
empname char(10)<br />
)</p>
<p>INSERT emp SELECT 1,2,&#8217;Vyas&#8217;<br />
INSERT emp SELECT 2,3,&#8217;Mohan&#8217;<br />
INSERT emp SELECT 3,NULL,&#8217;Shobha&#8217;<br />
INSERT emp SELECT 4,2,&#8217;Shridhar&#8217;<br />
INSERT emp SELECT 5,2,&#8217;Sourabh&#8217;</p>
<p>SELECT t1.empname [Employee], t2.empname [Manager]<br />
FROM emp t1, emp t2<br />
WHERE t1.mgrid = t2.empid</p>
<p>Here&#8217;s an advanced query using a LEFT OUTER JOIN that even returns the employees without managers (super bosses)</p>
<p>SELECT t1.empname [Employee], COALESCE(t2.empname, &#8216;No manager&#8217;) [Manager]<br />
FROM emp t1<br />
LEFT OUTER JOIN<br />
emp t2<br />
ON<br />
t1.mgrid = t2.empid</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/sql-interview-questions/38/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL</title>
		<link>http://www.dotnettutorial.info/sql/36/</link>
		<comments>http://www.dotnettutorial.info/sql/36/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 18:58:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[microsoft sql]]></category>

		<category><![CDATA[sql]]></category>

		<category><![CDATA[sql 2000]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=36</guid>
		<description><![CDATA[Introduction to SQL :
SQL is short form for Structured Query Language and is a simple language that provides instructions for building and modifying the structure of databases and for modifying the data stored in the tables. The main commands used to modify and retrieve data are:
Select - Fetches data.
Insert - Inserts one or more rows [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction to SQL :</strong></p>
<p>SQL is short form for Structured Query Language and is a simple language that provides instructions for building and modifying the structure of databases and for modifying the data stored in the tables. The main commands used to modify and retrieve data are:</p>
<p><strong>Select</strong> - Fetches data.<br />
<strong>Insert</strong> - Inserts one or more rows of data.<br />
<strong>Update</strong> - Modifies existing row(s) of data<br />
<strong>Delete</strong> - Deletes rows of data.<br />
There are several ANSI/ISO standards such as ANSI 92, one of the most popular. This defines a minimum subset of supported statements. Most compiler vendors support these standards.</p>
<p><strong>Two Classes of SQL</strong> :</p>
<p>SQL falls into two classes :<br />
Data Manipulation Language (<strong>DML</strong>) - SQL for retrieving and storing data.<br />
Data Design Language (<strong>DDL</strong>) - SQL for creating, altering and dropping tables.<br />
Most of the time, the SQL you use is for manipulating the data but occasionally you&#8217;ll need to create new tables, alter existing ones or add an index. One of the best things about SQL is that you can do all of these operations with just simple SQL commands.</p>
<p><strong>Relational Database</strong> :<br />
A database is an application that can store and retrieve data very rapidly. The relational bit refers to how the data is stored in the database and how it is organized. When we talk about database, we mean a relational database, in fact an RDBMS - Relational Database Management System.<br />
In a relational database, all data is stored in tables. These have the same structure repeated in each row (like a spreadsheet) and it is the relations between the tables that make it a &#8220;relational&#8221; table.</p>
<p>Before relational databases were invented (in the 1970s), other types of database such as hierarchical databases were used. However relational databases have been very successful for companies like Oracle, IBM and Microsoft. The open source world also has RDBMS.</p>
<p>RDBMS provides security, encryption, user access and can process SQL queries.</p>
<p><strong>Table</strong> :<br />
It&#8217;s rectangular spreadsheet made up of rows and columns. Each column specifies the type of data stored (numbers, strings or binary data - such as images).<br />
Unlike a spreadsheet where the user is free to have different data on each row, in a database table, every row can only contain the types of data that were specified.<br />
In C and C++, this is like an array of structs, where one struct holds the data for one row.</p>
<p><strong>Different Ways of Storing Data in a Database</strong> :<br />
There are two ways:</p>
<p>Via a Database Server.<br />
Via a Database File.<br />
Using a database file is the older method, more suited to desktop applications. E.G. Microsoft Access, though that is being phased out in favour of Microsoft SQL Server. SQLite is an excellent public domain database written in C that holds data in one file. There are wrappers for C, C++, C# and other languages.</p>
<p>Any database management system (DBMS) that can respond to queries from client machines formatted in the SQL language. When capitalized, the term generally refers to either of two database management products from Sybase and Microsoft. Both companies offer client-server DBMS products called <strong>SQL Server</strong>.</p>
<p><strong>Difference between sql and an sql server :</strong></p>
<p>SQL is an abreviation for Structured Query Language. SQL is a means to request data from a database. SQL is a standards based langage that has many versions approved by the American National Standards Institute (ANSI). There are many versions of ANSI-SQL and most databases support specific versions of ANSI-SQL. SQL Server is a database management system that was originally created by Sybase. Microsoft bought the rights from Sybase to market their own version of SQL Server on the Microsoft Windows operating system. Sybase still has versions of SQL Server on other operating systems. When people refer to SQL Server, they typically mean &#8220;Microsoft SQL Server.&#8221; Microsoft SQL Server is a database management system (DBMS) that utilizes SQL (or more specifically Transact-SQL, or T-SQL) as a means to extract data from it&#8217;s database tables.</p>
<p><strong>Normalization</strong> :</p>
<p>In creating a database, normalization is the process of organizing it into tables in such a way that the results of using the database are always unambiguous and as intended. Normalization may have the effect of duplicating data within the database and often results in the creation of additional tables. (While normalization tends to increase the duplication of data, it does not introduce redundancy, which is unnecessary duplication.) Normalization is typically a refinement process after the initial exercise of identifying the data objects that should be in the database, identifying their relationships, and defining the tables required and the columns within each table.<br />
A simple example of normalizing data might consist of a table showing:</p>
<p>Customer Item purchased Purchase price<br />
Rob     Shirt                 $40<br />
Tisca   Tennis shoes   $35<br />
Evas    Shirt                 $40</p>
<p>If this table is used for the purpose of keeping track of the price of items and you want to delete one of the customers, you will also delete a price. Normalizing the data would mean understanding this and solving the problem by dividing this table into two tables, one with information about each customer and a product they bought and the second about each product and its price. Making additions or deletions to either table would not affect the other.</p>
<p><strong>Denormalization</strong> :</p>
<p>As the name indicates, denormalization is the reverse process of normalization. It&#8217;s the controlled introduction of redundancy in to the database design. It helps improve the query performance as the number of joins could be reduced.</p>
<p><strong>ORACLE</strong> :</p>
<p>Some databases have minimal feature sets and only store data, while others include programming languages, facilities and utilities to support enterprise-level applications like ERP and data warehousing. Oracle is the database and has the most advanced feature set.<br />
Oracle is made up of a set of processes running in your operating system. These processes manage how data is stored and how it is accessed.Oracle is a program that is running in the background, maintaining your data for you and figuring out where it should go on your hard drive.<br />
In almost all relational databases, data is accessed through SQL, or Structured Query Language, and Oracle is no exception. SQL allows you to SELECT your data, INSERT new records, UPDATE existing records and DELETE records you want to get rid of. SQL can be embedded in other languages or you can run scripts of SQL directly against the database.<br />
PL/SQL is the procedural language extension to SQL. PL/SQL is a programming language like C, Java or Pascal. In the Oracle world, there is no better way to access your data from inside a program. SQL can be natively embedded in PL/SQL programs.PL/SQL is a feature-rich language geared toward developing database applications. PL/SQL is the procedural language of the database, but it is also the procedural language for most of Oracle&#8217;s tools. Programs that run inside the database are called stored procedures. These stored procedures are almost always PL/SQL, but can be written in Java.</p>
<p>Some of Oracle&#8217;s tools to access the database and create programs are:</p>
<p>SQL*Plus has a command line interface. With it, you can access the database and write stored procedures, you can run SQL commands to retrieve data and you can run scripts of either SQL, PL/SQL or built-in SQL*Plus commands, or a mixture of those three things.<br />
Oracle Developer is a 4GL GUI application Builder. With Developer, you can create forms, reports, and graphics. Oracle*Forms and Oracle*Reports are two components of Oracle Developer. Earlier versions created client-server applications, but the more recent versions create web applications that run under the Oracle Application Server (OAS). OAS is a web-based application server sold by Oracle. OAS is licensed separately and is very expensive (as are its closed source competitors). The current version is OAS 10g.<br />
HTML DB is a fairly new application builder geared toward web development (added to the DB with release 9iR2). HTML DB does not need an application server. This tool runs from the database and can be presented to the web using the Apache web server that comes with the database. Since this is not an additional license, it provides a cheaper way to develop applications. Developer is a feature-rich thick client with all of the normal GUI widgets. HTML DB is HTML-based and is very thin and limited to the HTML provided widgets.<br />
Oracle Enterprise Manager (OEM) is the Enterprise GUI tool to manage the database. From this tool, you can perform any action in the database that is required. This tool is primarily used for administration but can also be provided to developers for application tuning and monitoring. In Oracle 10g, OEM also provides Grid control.<br />
There are also a lot of third party tools for accessing the database. For our purposes, our primary tool for data access will be SQL*Plus. In the future, I will cover creating applications with HTML DB and accessing your data with some choice third-party tools.<br />
Java is the current hot language, especially on the web.Java is natively supported by Oracle.Java can be used to create your stored procedures if you chose. When you are working inside the database, I believe that you should only resort to Java when you cannot accomplish a task in PL/SQL. As you&#8217;ll see, there is very little you cannot accomplish with PL/SQL.<br />
It will be hard to learn Oracle if you can&#8217;t play with it.Oracle has a technical web site called OTN (Oracle Tech Net) that provides access to all of Oracle&#8217;s software and all of the documentation for that software. There are also forums and many other tools to use to help you learn Oracle. You have to register to access it, but registration is free. Go to <a href="http://otn.oracle.com/">http://otn.oracle.com/</a> and get an ID today.<br />
As a side note, Oracle provides all of their software with a developer&#8217;s license. This license allows you to try out the software free of charge. You may not create production applications without a paid license, but development with the tools is acceptable.Also, a note about versioning in Oracle; all products released by Oracle have a version. The current version of the database is 10g Release 1, also written as 10gR1. In addition to this semantic release name, each release has a numeric version. The numeric release for 10gR1 is 10.0.1.3.<br />
 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/sql/36/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Coding Examples in ASP.Net</title>
		<link>http://www.dotnettutorial.info/coding-examples-in-aspnet/34/</link>
		<comments>http://www.dotnettutorial.info/coding-examples-in-aspnet/34/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 16:48:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Coding Examples in ASP.Net]]></category>

		<category><![CDATA[asp]]></category>

		<category><![CDATA[asp net]]></category>

		<category><![CDATA[aspx]]></category>

		<category><![CDATA[html]]></category>

		<category><![CDATA[tag]]></category>

		<category><![CDATA[web applications]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=34</guid>
		<description><![CDATA[How to Upload a File in ASP.NET?
Here a .txt file is uploaded and saved it in a predefined location. Let see this by a simple programme.Here an input tag is highlighted in bold for browsing the uploaded file.
The fileupload.aspx code is:
&#60;% @ Page Language=&#8221;C#&#8221; AutoEventWireup=&#8221;true&#8221;  CodeFile=&#8221;Default.aspx.cs&#8221; Inherits=&#8221;_Default&#8221; %&#62;
&#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8220;&#62;
&#60;html [...]]]></description>
			<content:encoded><![CDATA[<p>How to Upload a File in ASP.NET?<br />
Here a .txt file is uploaded and saved it in a predefined location. Let see this by a simple programme.Here an input tag is highlighted in bold for browsing the uploaded file.</p>
<p>The fileupload.aspx code is:</p>
<p><strong>&lt;% </strong>@ Page Language=&#8221;C#&#8221; AutoEventWireup=&#8221;true&#8221;  CodeFile=&#8221;Default.aspx.cs&#8221; Inherits=&#8221;_Default&#8221; <strong>%&gt;<br />
</strong>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#8220;&gt;<br />
&lt;html xmlns=&#8221;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&#8220;&gt;<br />
&lt;head runat=&#8221;server&#8221;&gt;<br />
&lt;title&gt;File Upload Demostration&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>    &lt;form id=&#8221;Form1&#8243; method=&#8221;post&#8221; runat=&#8221;server&#8221;&gt;</p>
<p>      &lt;table cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; width=&#8221;80%&#8221; align=&#8221;center&#8221; border=&#8221;4&#8243;&gt;</p>
<p>        &lt;tr&gt;&lt;td height=&#8221;20px&#8221;&gt;&lt;/td&gt;&lt;/tr&gt;</p>
<p>          &lt;tr&gt;&lt;td height=&#8221;200px&#8221; align=&#8221;center&#8221; valign=&#8221;middle&#8221;&gt;</p>
<p>               <strong>&lt;input id=&#8221;MyFile&#8221;   type=&#8221;file&#8221; size=&#8221;81&#8243; name=&#8221;File1&#8243; runat=&#8221;server&#8221; /&gt;</strong></p>
<p>                      &lt;br /&gt;</p>
<p>&lt;br /&gt;</p>
<p>                           &lt;asp:Button id=&#8221;btnSubmit&#8221;   runat=&#8221;server&#8221; Text=&#8221;Submit&#8221; Width=&#8221;139px&#8221; Height=&#8221;30px&#8221; OnClick=&#8221;btnSubmit_Click&#8221;&gt;&lt;/asp:Button&gt;</p>
<p>                             &lt;asp:Label id=&#8221;lbl&#8221;   runat=&#8221;server&#8221; Width=&#8221;402px&#8221; Height=&#8221;33px&#8221;&gt;&lt;/asp:Label&gt;</p>
<p>                             &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</p>
<p>                   &lt;/form&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
<p>The fileupload.aspx.cs is:</p>
<p>using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;</p>
<p> <br />
public partial class _Default : System.Web.UI.Page</p>
<p>{</p>
<p>    protected void Page_Load(object sender, EventArgs e)</p>
<p>    {</p>
<p> <br />
    }</p>
<p>    protected void btnSubmit_Click(object sender, EventArgs e)</p>
<p>    {</p>
<p>        if (MyFile.PostedFile.ContentLength == 0)</p>
<p>        {</p>
<p>            lbl.Text = &#8220;Cannot upload zero length file&#8221;;</p>
<p>            return;</p>
<p>        }</p>
<p>        lbl.Text = MyFile.PostedFile.FileName;</p>
<p>       MyFile.PostedFile.SaveAs(&#8221;c:\\UploadFile\\MyFile.PostedFile.FileName&#8221;);</p>
<p> </p>
<p>    }</p>
<p>}</p>
<p> <a href="http://www.dotnettutorial.info/wp-content/uploads/2008/12/how-do-upload-text-file-in-asp-the-snap-shots-of-process.doc">How to upload text-file in asp.net - The snap shots of process</a></p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/coding-examples-in-aspnet/34/feed/</wfw:commentRss>
		</item>
		<item>
		<title>General Dot Net Interview Questions</title>
		<link>http://www.dotnettutorial.info/general-dot-net-interview-questions/32/</link>
		<comments>http://www.dotnettutorial.info/general-dot-net-interview-questions/32/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 19:24:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Dot Net Tutorial]]></category>

		<category><![CDATA[General Dot Net Interview Questions]]></category>

		<category><![CDATA[asp]]></category>

		<category><![CDATA[asp net]]></category>

		<category><![CDATA[c sharp]]></category>

		<category><![CDATA[csharp]]></category>

		<category><![CDATA[dot net]]></category>

		<category><![CDATA[dotnet]]></category>

		<category><![CDATA[interview questions]]></category>

		<category><![CDATA[job interview questions]]></category>

		<category><![CDATA[technical interview questions]]></category>

		<category><![CDATA[vb]]></category>

		<category><![CDATA[vb net]]></category>

		<category><![CDATA[visual basic]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=32</guid>
		<description><![CDATA[Key differences in features of .NET 2.0 and 3.5? 
.NET 3.5 has more advanced feature than .NET 2.0.They are WCF, WPF, WCS,WF and LINQ.
Is Dot-Net platform dependent or platform indipendent?
Net is not platform independent as it needs .Net framework to run. As MS is the owner, so it is including .Net frameworks in latest versions of Windows.MS [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Key differences in features of .NET 2.0 and 3.5? <br />
</strong>.NET 3.5 has more advanced feature than .NET 2.0.They are WCF, WPF, WCS,WF and LINQ.</p>
<p><strong>Is Dot-Net platform dependent or platform indipendent?</strong><br />
Net is not platform independent as it needs .Net framework to run. As MS is the owner, so it is including .Net frameworks in latest versions of Windows.MS is providing service pack using which you can manage old versions of Windows and other operating systems like Unix, Linux. But not yet, .Net is running in UNIX and Linux. So it is not platform independent. As it comprises of lot of languages, you can say it as language independent.<br />
MS is saying Windows is best operating system but they are developing Windows OS on Unix platform.Also Java, it is also not platform independent as it requires JVM (Java Virtual Machine to run). But the case is JVM is coming in all operating systems by default. So you can take it as platform independent.</p>
<p><strong>What is CAS?</strong> <br />
CAS: CAS is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk. How does CAS work? The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set. For example, using the default security policy, a control downloaded from a web site belongs to the &#8216;Zone - Internet&#8217; code group, which adheres to the permissions defined by the &#8216;Internet&#8217; named permission set. (Naturally the &#8216;Internet&#8217; named permission set represents a very restrictive range of permissions.) </p>
<p><strong>IIS port number? How We get it?</strong> <br />
IIS default port numbers for http is 80 , for https 81, and for ftp its 21. These are the default port numbers but we can override this port numbers while creating a website (either SSL or normal) and while creating a ftp folder. </p>
<p><strong>What is postback form and what is autopostback?</strong> <br />
PostBack: It means page automatically goes to server and we can just make a check whther our page is on server for the first time or not.<br />
Propert Page.IspostBack== true means your page has made a server visit. It is only a readOnly property i.e. we can only check that, cannot set this property accordingly.<br />
AutoPostBack: It is property for .net controls to allow them to post the page to server and execute code-behind code at their events.<br />
By Default,Button has this property set to true. For other controls like DropDownList,RadioButtonList etc., we have to set set it to true if we want to perform an action at their events like selectedIndexChanged etc.</p>
<p><strong>How can you tell the application to look for assemblies at the locations other than its own install? <br />
</strong>Use the directive in the XML .config file for a given application. Make Your Homepage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/general-dot-net-interview-questions/32/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Crystal Report in Visual Studio 2005</title>
		<link>http://www.dotnettutorial.info/crystal-report-in-visual-studio-2005/31/</link>
		<comments>http://www.dotnettutorial.info/crystal-report-in-visual-studio-2005/31/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 18:10:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Visual Studio .NET]]></category>

		<category><![CDATA[crystal report]]></category>

		<category><![CDATA[crystal report in dotnet]]></category>

		<category><![CDATA[crystal report tutorial]]></category>

		<category><![CDATA[crystal report tutorials]]></category>

		<category><![CDATA[crystal reports]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=31</guid>
		<description><![CDATA[Crystal Report: Creating reports is one of the most common things developers are asked to do when building a typical business application.Businesses want to know how well a product has sold, the sales total for the month, the inventory status, etc.All these require specialized tools for easily generating the reports.
Steps to create the crystal report [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Crystal Report: </strong>Creating reports is one of the most common things developers are asked to do when building a typical business application.Businesses want to know how well a product has sold, the sales total for the month, the inventory status, etc.All these require specialized tools for easily generating the reports.</p>
<p><strong>Steps to create the crystal report in Visual Studio 2005:</strong></p>
<p>To get started, launch Visual Studio 2005 and create a new Windows project. Name the project as Report. Add a new item to the project by right-clicking on the project name in Solution Explorer and then selecting Add | New Item. . . . Select the Crystal Report template and use its default name of CrystalReport1.rpt.<br />
Table Selection: Selecting the tables to use for the report.<br />
You will be greeted with the Crystal Reports Gallery dialog. Choose the “Using the Report Wizard” and “Standard” options and click OK.<br />
The Standard Report Creation Wizard dialog will now appear. In this step, you will choose the data source to connect to so that you can use it to generate the report. For this article, you will connect to a SQL Server 2005 Express database (you will use the Northwind database). Expand the Create New Connection data source and then expand the OLDE DB (ADO) item.<br />
You will be asked to select an OLE DB provider. For SQL 2005 Server databases, select SQL Native Client.</p>
<p>In the next step, you need to provide the connection information for the database you are connecting to. Type in .\SQLEXPRESS for the server name and check the Integrated Security checkbox. Click the drop-down list next to the Database item and select the Northwind database. Click Next to continue. In the next dialog, simply click Finish to finish configuring the data source.<br />
 <br />
Summary Information: Adding/removing the summaries fields.</p>
<p>You will now be asked to choose the tables to use for the report. Expand the Northwind database, followed by dbo and then Tables. Select the following tables and click the &gt; button:</p>
<p>Customers<br />
Orders Details<br />
Orders<br />
Products</p>
<p>Click Next to continue. In the next dialog, you will be asked to confirm the relationships between the various tables you have selected. Click Next to continue.</p>
<p>Final Product: The completed report in Visual Studio 2005.</p>
<p>In the next dialog, you&#8217;ll select the fields to use for the report. Select the following fields and click the &gt; button:</p>
<p>Customers.CompanyName<br />
Orders Details.UnitPrice<br />
Orders Details.Quantity<br />
Orders.ShipCountry</p>
<p>Click Next to continue. In the next dialog, you&#8217;ll choose the field to group the report. Select the Customers.CompanyName field and click the &gt; button to add the field.<br />
Click Next to continue. In the next dialog, you&#8217;ll add summary information to the report. Crystal Report automatically detects the numeric fields that can be summed and adds the two fields. In this case, you are more interested to know about the total quantity of a product ordered by a company, rather than the total price of products ordered. Hence, select the Sum of Order Details.UnitPrice item and click the &lt; button to remove it from the report.</p>
<p>Click Next to continue. In the next three dialogs, click Next to continue. In the final dialog, select one of the available report styles that you can use to build your report. Select the Drop Table style and click Finish.</p>
<p>The crystal report is ready.</p>
<p><strong>Previewing a Report</strong><br />
After the report is created, you can preview how it will look like by clicking the Main Report Preview button located at the bottom of the report. The report will be shown in two columns—the left column shows a list of companies that you can select and the right shows the report with the selected company&#8217;s name shown highlighted in blue.</p>
<p><strong>Viewing a Report in a Windows Form</strong><br />
A report is only useful if it can be displayed in a Windows form during runtime. To do that, you will need to use the CrystalReportViewer control, a control that displays the report in a page-based layout.</p>
<p>First, add a new Windows Form to the project and use its default name of Form2. Double-click on the CrystalReportViewer control (located in the Toolbox) to add a new instance onto Form2. By default, the CrystalReportViewer control will fill the entire form. If you do not want it to fill the entire form, simply set the Dock property of the control to either left, right, top, bottom, or none. For this example, leave it as it is.</p>
<p>Form2: Adding the CrystalReportViewer control to Form2.</p>
<p>Back to Form1, add a Button control to it and set is Text property to View Report. Name the control btnViewReport. Double-click the button and code its Click event handler as follows:</p>
<p>Private Sub btnViewReport_Click( _<br />
   ByVal sender As System.Object, _<br />
   ByVal e As System.EventArgs) _<br />
   Handles btnViewReport.Click</p>
<p>        Dim report As New CrystalReport1<br />
        With Form2<br />
            .CrystalReportViewer1.ReportSource = report<br />
            .ShowDialog()<br />
        End With</p>
<p>    End Sub</p>
<p>Press F5 to test the application. When you click the View Report button, Form2 will appear, displaying the report.<br />
 <br />
Displaying Form2: This image displays the report in runtime.</p>
<p>At the top of Form2, there are several controls associated with the report:</p>
<p>Export Report: Saves the report in various file formats (.rpt, .pdf, .xls, .doc, .rtf, etc.)<br />
Print Report: Prints the report to the printer.<br />
Refresh Report: Refreshes the report.<br />
Toggle Group Tree: Hides/displays the left column of the report.<br />
Navigational Buttons: Navigates between pages in the report.<br />
Find Text: Performs a search for specific words.<br />
Zoom: Adjusts the view proportion of the report.<br />
Adding Parameters to the Report<br />
The report created in the previous section lists out all the customers&#8217; orders. This might not be too useful as most of the time you might only want to view the orders for a particular customer. Hence, you should modify the report so that during runtime you can specify the particular customer to list.<br />
In the Main Report view of the report, right-click on the Parameter Fields items located in the Field Explorer and select New…. This will create a new parameter for your report so that you can pass it a value during runtime.</p>
<p>In the Create Parameter Field dialog, specify Customer_ID as the name and use the other default values. Click OK. In the Choose Field dialog, choose CustomerID and click OK.</p>
<p>Click the Select Expert button ocated in the toolbar of Visual Studio 2005.</p>
<p>In the Select Expert dialog, set the values of the controls as shown in Figure 8. This indicates that the customer ID used for the report will be dependent on the values passed into the Customer_ID parameter (represented as {?Customer_ID}).<br />
Setting Values: Setting the value of the CustomerID to be dependent on the parameter.  <br />
Adding Controls: Adding the controls to Form1.<br />
Back in Form1, add a Label and ComboBox control as shown in Figure 9.</p>
<p>Switch to the code-behind of Form1 and import the following namespaces:<br />
Imports System.Data<br />
Imports System.Data.SqlClient</p>
<p>In the Form1_Load event, code the following to populate the ComboBox control with all the customers&#8217; ID:</p>
<p>Private Sub Form1_Load( _<br />
   ByVal sender As System.Object, _<br />
   ByVal e As System.EventArgs) _<br />
   Handles MyBase.Load</p>
<p>        Dim connStr As String = _<br />
           &#8220;Data Source=.\SQLEXPRESS;&#8221; &amp; _<br />
           &#8220;Initial Catalog=Northwind;&#8221; &amp; _<br />
           &#8220;Integrated Security=True&#8221;<br />
        Dim sql As String = &#8220;SELECT CustomerID FROM Customers&#8221;<br />
        Dim conn As SqlConnection = New SqlConnection(connStr)<br />
        Dim comm As SqlCommand = New SqlCommand(sql, conn)<br />
        conn.Open()<br />
        Dim reader As SqlDataReader = comm.ExecuteReader<br />
        While reader.Read<br />
            ComboBox1.Items.Add(reader(0))<br />
        End While<br />
        conn.Close()</p>
<p>    End Sub</p>
<p>Parameters Added: Viewing the orders made by the selected customer.</p>
<p>Modify the Click event of the button control to set the parameter with a value (which is the customer ID selected in the ComboBox control):<br />
Private Sub btnViewReport_Click( _<br />
   ByVal sender As System.Object, _<br />
   ByVal e As System.EventArgs) _<br />
   Handles btnViewReport.Click</p>
<p>        Dim report As New CrystalReport1<br />
        report.SetParameterValue( _<br />
           &#8220;Customer_ID&#8221;, ComboBox1.Text)<br />
        With Form2<br />
            .CrystalReportViewer1.ReportSource = report<br />
            .ShowDialog()<br />
        End With</p>
<p>    End Sub</p>
<p>That&#8217;s it! Press F5 to test the application. When the form is loaded, select a customer ID and click the View Report button. The report will now only contain the orders made by the selected customer.</p>
<p><strong>Displaying Charts</strong><br />
Crystal Report also supports the creation of graphical charts. In this section, you will see how you can display a chart showing the percentages of a particular product ordered by the each customer.</p>
<p>Add a new Crystal Report to the project and use its default name of CrystalReport2.rpt. Follow the same steps as before:</p>
<p><strong>Add the following tables to the report:</strong></p>
<p>Customers<br />
Order Details<br />
Orders<br />
Products</p>
<p><strong>Choose the following fields to display:</strong></p>
<p>Customers.CompanyName<br />
Products.ProductName<br />
Order Details.Quantity<br />
 <br />
After Configuration: The completed report with the chart.</p>
<p>Group the report by Customers.CompanyName.</p>
<p>For the Summaries section, ensure that only Sum of Order Details.Quantity is present.</p>
<p>In the Chart dialog, check the Pie Chart option.</p>
<p>Now, add a new Parameter Field to the report and name the parameter Product_Name. Click the Select Expert button and bind the parameter to the Products.ProductName field of the report.</p>
<p><strong>Finally, add the following controls to Form1:</strong></p>
<p>Label<br />
ComboBox<br />
Button<br />
Add the following code in bold so that when the form is loaded, you will add the list of product names to the second ComboBox control:</p>
<p>Private Sub Form1_Load( _<br />
   ByVal sender As System.Object, _<br />
   ByVal e As System.EventArgs) _<br />
   Handles MyBase.Load</p>
<p>        Dim connStr As String =<br />
           &#8220;Data Source=.\SQLEXPRESS;&#8221; &amp; _<br />
           &#8220;Initial Catalog=Northwind;&#8221; &amp; _<br />
           &#8220;Integrated Security=True&#8221;<br />
        Dim sql As String = &#8220;SELECT CustomerID FROM Customers&#8221;<br />
        Dim conn As SqlConnection = New SqlConnection(connStr)<br />
        Dim comm As SqlCommand = New SqlCommand(sql, conn)<br />
        conn.Open()<br />
        Dim reader As SqlDataReader = comm.ExecuteReader<br />
        While reader.Read<br />
            ComboBox1.Items.Add(reader(0))<br />
        End While<br />
        conn.Close()</p>
<p>        sql = &#8220;SELECT ProductName from Products&#8221;<br />
        comm.CommandText = sql<br />
        conn.Open()<br />
        reader = comm.ExecuteReader<br />
        While reader.Read<br />
            ComboBox2.Items.Add(reader(0))<br />
        End While<br />
        conn.Close()</p>
<p>    End Sub</p>
<p>Code the Click event of the View Chart button as follows:<br />
Private Sub btnViewChart_Click( _<br />
   ByVal sender As System.Object, _<br />
   ByVal e As System.EventArgs) _<br />
   Handles btnViewChart.Click</p>
<p>        Dim report As New CrystalReport2<br />
        report.SetParameterValue(&#8221;Product_Name&#8221;, ComboBox2.Text)<br />
        With Form2<br />
            .CrystalReportViewer1.ReportSource = report<br />
            .ShowDialog()<br />
        End With<br />
Distribution of Orders: Viewing the orders for a product by the various customers in a pie chart.</p>
<p>   End Sub</p>
<p>That&#8217;s it! Press F5 to test the application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/crystal-report-in-visual-studio-2005/31/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Crystal Reports</title>
		<link>http://www.dotnettutorial.info/crystal-reports/30/</link>
		<comments>http://www.dotnettutorial.info/crystal-reports/30/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 16:39:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Visual Basic(VB.Net)]]></category>

		<category><![CDATA[crystal report]]></category>

		<category><![CDATA[crystal report professional]]></category>

		<category><![CDATA[crystal reports]]></category>

		<category><![CDATA[tutorial crystal reports]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=30</guid>
		<description><![CDATA[Creating reports is one of the most common things developers are asked to do when building a typical business application.
Businesses want to know how well a product has sold, the sales total for the month, the inventory status, etc.
All these require specialized tools for easily generating the reports.
Developers who are migrating from Visual Basic 6 [...]]]></description>
			<content:encoded><![CDATA[<p>Creating reports is one of the most common things developers are asked to do when building a typical business application.<br />
Businesses want to know how well a product has sold, the sales total for the month, the inventory status, etc.<br />
All these require specialized tools for easily generating the reports.<br />
Developers who are migrating from Visual Basic 6 Crystal Report are now available on Visual Studio 2005.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/crystal-reports/30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>VB.Net Interview Questions</title>
		<link>http://www.dotnettutorial.info/vbnet-interview-questions/29/</link>
		<comments>http://www.dotnettutorial.info/vbnet-interview-questions/29/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 18:57:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[VB.Net Interview Questions]]></category>

		<category><![CDATA[c#]]></category>

		<category><![CDATA[dot net]]></category>

		<category><![CDATA[dotnet]]></category>

		<category><![CDATA[download visual basic]]></category>

		<category><![CDATA[interview questions]]></category>

		<category><![CDATA[job interview questions]]></category>

		<category><![CDATA[vb code]]></category>

		<category><![CDATA[vb net]]></category>

		<category><![CDATA[visual basic]]></category>

		<category><![CDATA[visual basic 6.0]]></category>

		<category><![CDATA[visual basic net]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=29</guid>
		<description><![CDATA[What is the purpose of .net frame work? 
.Net Framework is an umbrella technology and has a lot of different technologies under it. For example, it
1. introduces Asp.net for web development
2. has languages to write Windows program, Windows services, Web Services.
3. pre-coded solutions to common programming problems     called base class library. It includes user interface data [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is the purpose of .net frame work? <br />
</strong>.Net Framework is an umbrella technology and has a lot of different technologies under it. For example, it<br />
1. introduces Asp.net for web development<br />
2. has languages to write Windows program, Windows services, Web Services.<br />
3. pre-coded solutions to common programming problems     called base class library. It includes user interface data accessdatabase connectivity cryptography web application development, numeric algorithms, and network communications<br />
4. a runtime or virtual machine that manages the execution of programs written specifically for the framework,<br />
5. and a set of tools for configuring and building applications  like visual studio.<br />
It also introduces language independence by introducing common language runtime. You can write code in any language.<br />
The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform.</p>
<p><strong>What is the difference between visual basic and visual basic dot net?<br />
</strong>VB.NET is Microsoft&#8217;s Visual Basic implemented onto their .NET Framework. While Visual Basic is part of Visual Studio, VB.NET is also part of the Visual Studio.NET release.</p>
<p><strong>What is JIT(Just In Time) and How it works? <br />
</strong>Before the code can be executed,the .NET framework needs to convert the IL into CPU-specific code.the Just-In-Time(JIT) compiler translates the code from IL into managed native code.During the compilation,the JIT compiler compiles only the code that is required during execution instead of compiling the complete IL code.when an uncompiled method is invoked during execution,the JIT compiler converts the IL for that method into native code.during this  the code is also checked for type safety,Type safety ensures that objects are always accessed in a compilation way.</p>
<p><strong>Crystal Reports</strong></p>
<p><strong>How to Pass string value to crystal report 11?<br />
</strong>Code for this</p>
<p>Dim crParameterFieldDefinitions As ParameterFieldDefinitions<br />
Dim crParameterFieldDefinition AsParameterFieldDefinition<br />
Dim crParameterValues As New ParameterValues<br />
Dim crParameterDiscreteValue1 As NewParameterDiscreteValue</p>
<p>crParameterDiscreteValue1.Value = Trim(tbPRAM.Text) &#8212; text box to hold value</p>
<p>crParameterFieldDefinitions =cryRpt.DataDefinition.ParameterFields()<br />
crParameterFieldDefinition = crParameterFieldDefinitions.Item(&#8221;PRAM&#8221;)<br />
crParameterValues =crParameterFieldDefinition.CurrentValues</p>
<p>crParameterValues.Clear()<br />
crParameterValues.Add(crParameterDiscreteValue1)</p>
<p>crParameterFieldDefinition.ApplyCurrentValues(crPar ameterValues)</p>
<p>parameter PRAM must be set in your report.</p>
<p><strong>How does VB.NET/C# achieve polymorphism?</strong> <br />
You can achive polymorphism by doing overloading and overwriting.<br />
 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/vbnet-interview-questions/29/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C# Interview Questions</title>
		<link>http://www.dotnettutorial.info/c-interview-questions/27/</link>
		<comments>http://www.dotnettutorial.info/c-interview-questions/27/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 16:41:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C# Interview Questions]]></category>

		<category><![CDATA[c sharp]]></category>

		<category><![CDATA[c#]]></category>

		<category><![CDATA[c# net]]></category>

		<category><![CDATA[c# tutorial]]></category>

		<category><![CDATA[csharp]]></category>

		<category><![CDATA[dotnet]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[vb net]]></category>

		<category><![CDATA[visual c++]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=27</guid>
		<description><![CDATA[What’s the top .NET class that everything is derived from?
System.Object.
Does C# support multiple-inheritance?
No.
Who is a protected class-level variable available to?
It is available to any sub-class (a class inheriting this class).
Are private class-level variables inherited?
Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.
Describe the accessibility [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What’s the top .NET class that everything is derived from?<br />
</strong>System.Object.</p>
<p><strong>Does C# support multiple-inheritance?<br />
</strong>No.</p>
<p><strong>Who is a protected class-level variable available to?<br />
</strong>It is available to any sub-class (a class inheriting this class).</p>
<p><strong>Are private class-level variables inherited?<br />
</strong>Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.</p>
<p><strong>Describe the accessibility modifier “protected internal”?</strong><br />
It is available to classes that are within the same assembly and derived from the specified base class.</p>
<p><strong>What does the term immutable mean?</strong><br />
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.</p>
<p><strong>What’s a delegate?</strong><br />
A delegate object encapsulates a reference to a method.</p>
<p><strong>What’s a multicast delegate?</strong><br />
A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.</p>
<p><strong>Is XML case-sensitive?<br />
</strong>Yes.</p>
<p><strong>What’s the difference between // comments, /**/ comments and /// comments?<br />
</strong>Single-line comments, multi-line comments, and XML documentation comments.</p>
<p><strong>How do you generate documentation from the C# file commented properly with a command-line compiler?<br />
</strong>Compile it with the /doc switch.</p>
<p><strong>What’s the difference between System.String and System.Text.StringBuilder classes?</strong><br />
System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.</p>
<p><strong>Can you store multiple data types in System.Array?</strong><br />
No.</p>
<p><strong>What’s the advantage of using System.Text.StringBuilder over System.String?</strong><br />
StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.</p>
<p><strong>Will the finally block get executed if an exception has not occurred?<br />
</strong>Yes.</p>
<p><strong>What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?</strong><br />
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The  CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element&#8217;s object,resulting in a different, yet identacle object.</p>
<p><strong>How can you sort the elements of the array in descending order?<br />
</strong>By calling Sort() and then Reverse() methods.</p>
<p><strong>What’s the .NET collection class that allows an element to be accessed using a unique key?<br />
</strong>HashTable.</p>
<p><strong>What’s the C# syntax to catch any possible exception?</strong><br />
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.</p>
<p><strong>Can multiple catch blocks be executed for a single try statement?</strong><br />
No. Once the proper catch block processed, control is transferred to the finally block (if there are any). </p>
<p><strong>Explain the three services model commonly know as a three-tier application?<br />
</strong>Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).</p>
<p><strong>How does VB.NET/C# achieve polymorphism?</strong> <br />
You can achive polymorphism by doing overloading and overwriting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/c-interview-questions/27/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASP.Net Interview Questions</title>
		<link>http://www.dotnettutorial.info/aspnet-interview-questions/25/</link>
		<comments>http://www.dotnettutorial.info/aspnet-interview-questions/25/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 15:55:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ASP.Net Interview Questions]]></category>

		<category><![CDATA[Dot Net Tutorial]]></category>

		<category><![CDATA[asp]]></category>

		<category><![CDATA[asp application]]></category>

		<category><![CDATA[asp code]]></category>

		<category><![CDATA[asp net]]></category>

		<category><![CDATA[asp tutorial]]></category>

		<category><![CDATA[asp web hosting]]></category>

		<category><![CDATA[dotnet]]></category>

		<category><![CDATA[interview questions]]></category>

		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=25</guid>
		<description><![CDATA[
ASP.Net is a language or not? 
ASP.NET is not a language.It&#8217;s a frame work we can use to develop websites.
What is aspx? 
aspx is the extension used for Microsoft ASP.NET web pages.
ASP.NET is a framework that runs on the MS web server and allows for rich dynamic content. aspx files are compiled rather than interpreted, and run [...]]]></description>
			<content:encoded><![CDATA[<p><strong></strong></p>
<p><strong>ASP.Net is a language or not? <br />
</strong>ASP.NET is not a language.It&#8217;s a frame work we can use to develop websites.</p>
<p><strong>What is aspx? <br />
</strong>aspx is the extension used for Microsoft ASP.NET web pages.<br />
ASP.NET is a framework that runs on the MS web server and allows for rich dynamic content. aspx files are compiled rather than interpreted, and run much faster than other scripted files.</p>
<p><strong>What is the difference between ASP.NET &amp;VB.NET?<br />
</strong>Asp.net and vb.net both are in dot net family but asp.net is used to develop web site(web application) and vb.net is used to create a windows application.</p>
<p><strong>What is the major difference between asp.net and c#.net?</strong> <br />
Asp.net is used to develop a web application by either using vb or c# based syntax. C#.net is used to develop a windows application.</p>
<p><strong>What is the .net,why we use .net.what is the advantage to using .net other programming languages?</strong> <br />
.net is not a technology or language .it is an environment to develop an application either web/window/console based<br />
It provide the ability to achieve versioning.<br />
Remove legacy/dependancy over os end the com based componet.<br />
Can acheieve side by side exceution.</p>
<p><strong>How to publish my asp .net project on web site?<br />
</strong>1.Rename to your home page as index.aspx</p>
<p>2.Open internet explorer and type the url <a href="ftp://xxxxx.xxx">ftp://xxxxx.xxx</a> (your url).</p>
<p>3.You shoud enter the user name and password.</p>
<p>4.You can get some folders, in that open httpdocs, in this you have to paste the all pages.You can also paste the folders also but you should paste the all pages must directly but don&#8217;t paste in other folders.</p>
<p><strong>What is Web.config file in ASP.NET? <br />
</strong>Web.config file, as it sounds like is a configuration file for the Asp .net web application.An Asp.net application has one web.config file which keeps configurations required for the corresponding application.Web.config file is written in XML with specific tags having specific meanings.We have Machine.config file also. As web.config file is used to configure one asp .net web application, same way Machine.config file is used to configure the application according to a particular machine. That is, configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications. </p>
<p><strong>What is the trace in ASP.NET? <br />
</strong>ASP.NET introduces new functionality that allows you to view diagnostic information about a single request for an ASP.NET page simply by enabling it for your page or application. Called tracing, this feature also allows you to write debug statements directly in your code without having to remove them from your application when it is deployed to production servers. You can write variables or structures in a page, assert whether a condition is met, or simply trace through the execution path of your page or application.  </p>
<p><strong>What is Viewstate? <br />
</strong>View state is used by the ASP.NET page framework to automatically save the values of the page and of each control just prior to rendering to the page.When the page is posted, one of the first tasks performed by page processing is to restore view state. State management is the process by which you maintain state and page information over multiple requests for the same or different pages. </p>
<p><strong>Diffrence Between ServerSide and ClientSideCode ?</strong> <br />
server side code is responsible to execute and provide the executed code to the browser at the client side. The executed code may be either in XML or Plain HTML the executed code only have the values or the results that are executed on the server. The clients browser executes the HTML code and displays the result where as the client side code executes at client side and displays the result in its browser.The client side core consist of certain functions that are to be executed on server then it places request to the server and the server responses as the result in form of HTML.<br />
 </p>
<p><strong>Diffrence Between ServerSide and ClientSideCode ? <br />
</strong>Server side code is responsible to execute and provide the executed code to the browser at the client side. The executed code may be either in XML or Plain HTML the executed code only have the values or the results that are executed on the server. The clients browser executes the HTML code and displays the result where as the client side code executes at client side and displays the result in its browser.The client side core consist of certain functions that are to be executed on server then it places request to the server and the server responses as the result in form of HTML. <br />
 </p>
<p><strong>Define three test cases you should go through in unit testing?</strong> <br />
1)Positive test cases (correct data, correct output).<br />
2)Negative test cases (broken or missing data,proper handling).<br />
3)Exception test cases (exceptions are thrown and caught properly).</p>
<p><strong>What debugging tools come with the .NET SDK?</strong><br />
1. CorDBG – command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch.<br />
2. DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. <br />
 <br />
<strong>Where are shared assemblies stored ? <br />
</strong>Global assembly cache.</p>
<p><strong>What is a web services?</strong> <br />
Web services is a excellent way of performing remote method calls.<br />
Its a platform independent one because it follows the xml standards.<br />
We can find the available services in <a href="http://uddi.org/">http://uddi.org/</a> is the place for universal description,discovery and integration of web services.</p>
<p><strong>Why web services are used in asp.net?<br />
</strong>It is a specification to achieve cross language,cross pltform and cross device integration (or)it can be considered as a class definition  where the definitions is maintained with in the web server as a service such that the definitions  can be accessed from any application developed using any language for any platform or device.</p>
<p><strong>What is the transport protocol you use to call a Web service? <br />
</strong>SOAP is the preferred protocol.</p>
<p><strong>How can you debug failed assembly binds? <br />
</strong>Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched.  </p>
<p><strong>What is the purpose of .net frame work? <br />
</strong>Net Framework is an umbrella technology and has a lot of different technologies under it. For example, it<br />
1. Introduces Asp.net for web development<br />
2. Has languages to write Windows program, Windows services, Web Services.<br />
3. Pre-coded solutions to common programming problems   called base class library. It includes user interface data accessdatabase connectivity cryptography web application development, numeric algorithms, and network communications<br />
4. A runtime or virtual machine that manages the execution of programs written specifically for the framework,and a set of tools for configuring and building applications  like visual studio.</p>
<p>It also introduces language independence by introducing common language runtime. You can write code in any language.<br />
The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform. </p>
<p><strong>What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? <br />
</strong>Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site. </p>
<p><strong>Name two properties common in every validation control?<br />
</strong>ControlToValidate property and Text property.</p>
<p><strong>What is Satellite Assemblies?<br />
</strong>Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated with a given language and .NET Framework version. No core .NET Framework files are removed unless the last language for that .NET Framework version is being removed. For example, English and Japanese editions of the .NET Framework version 1.1 share the same core files. The Japanese .NET Framework version 1.1 adds satellite assemblies with localized resources in a <a href="file://\\ja">\\ja</a> subdirectory. An application that supports the .NET Framework version 1.1, regardless of its language, always uses the same core runtime files. </p>
<p><strong>What data type does the RangeValidator control support?<br />
</strong>Integer,String and Date.</p>
<p><strong>What is Web.config file in ASP.NET? <br />
</strong>Web.config file, as it sounds like is a configuration file for the Asp .net web application. An Asp .net application has one web.config file which keeps configurations required for the corresponding application. Web.config file is written in XML with specific tags having specific meanings.We have Machine.config file also. As web.config file is used to configure one asp .net web application, same way Machine.config file is used to configure the application according to a particular machine. That is, configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications.</p>
<p><strong>What do you mean Class?</strong><br />
Class is an organized store-home in object-oriented programming that gives coherent functional abilities to a group of related code. Its are definition of an object, made up of software code. Using classes, you may wrap data and behavior together (Encapsulation).you may define classes in terms of classes (Inheritance).We can also override the behavior of a class using an alternate behavior (Polymorphisms).</p>
<p><strong>Difference between Abstract and Interface?</strong>  <br />
1.We can&#8217;t create instances for both<br />
2.Single inheritance in abstract class, multiple inheritance in interface<br />
3.We can have concrete method in abstact class but not in the interface<br />
4.Any class that needs to use abstract must extent<br />
5.Any class that needs to use interface must implement<br />
6.Interface all the variables are static and final.</p>
<p><strong>What’s the difference between private and shared assembly?<br />
</strong>Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.</p>
<p><strong>In your asp.net application there is a textbox, How can clear the textbox with out round trip?<br />
</strong>Assume that your textbox ID is txt. And the button ID is btn. If you want to clear the text from textbox by clicking the button without refresh then do the following steps.</p>
<p>1) <em>In Page_Load  write</em></p>
<p>btn.Attributes.Add(\&#8221;OnClick\&#8221;,\&#8221;clearIt();\&#8221;);</p>
<p>2) <em>In javascript write the function</em></p>
<p>function clearIt()</p>
<p>{</p>
<p>document.getElementById(\&#8217;txt\&#8217;).value = \&#8221;\&#8221;;</p>
<p>}</p>
<p><strong>Can we use http handlers to upload a file in asp.net? <br />
</strong>You can use HttpHandlers. But it is very limited. You can not get response back (status) if you use it. And it is very complex also. Generally we use Http Handlers to handle requests at Server Side like Putting common Authentication on Web services whole organization wide like this.</p>
<p><strong>What is user control? <br />
</strong>User Control are the controls created by user. User Controls are created with the file .ascx extension. Suppose if same controls are to be repeated in several pages,we can create a user control and display it in all those pages. They have to be registered in the page with @Register directive.</p>
<p><strong>Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler? <br />
</strong>Add an OnMouseOver attribute to the button.<br />
Example: btnSubmit.Attributes.Add(&#8221;onmouseover&#8221;,&#8221;someClientCodeHere();&#8221;).</p>
<p><strong>Whats an assembly? <br />
</strong>Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.</p>
<p><strong>Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?</strong> <br />
DataTextField property.</p>
<p><strong>How to dynamically change connection string in web.config? <br />
</strong>In web.config<br />
&lt;appsetting&gt;<br />
&lt;add key =\&#8221;constr\&#8221; value =\&#8221;Persist Security Info=False;User ID=sa;password=sa;Initial Catalog=Database Name;Data Source=server Name\&#8221;/&gt;<br />
&lt;/appSettings&gt;<br />
in aspx page<br />
string _constr;<br />
_constr=ConfigurationManager.AppSettings[\"constr\"].ToString().</p>
<p><strong>What is Flex-Grid in ASP.NET?</strong> <br />
In .net all data controls (GridView,Repeater,Datalist) are act like Flex grid.</p>
<p><strong>What tags do you need to add within the asp:datagrid tags to bind columns manually?<br />
</strong>Set AutoGenerateColumns Property to false on the datagrid tag.</p>
<p><strong>What is the trace in ASP.NET?</strong> <br />
ASP.NET introduces new functionality that allows you to view diagnostic information about a single request for an ASP.NET page simply by enabling it for your page or application. Called tracing, this feature also allows you to write debug statements directly in your code without having to remove them from your application when it is deployed to production servers. You can write variables or structures in a page, assert whether a condition is met, or simply trace through the execution path of your page or application.  </p>
<p><strong>What is delay signing?</strong> <br />
Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.</p>
<p><strong>What is the use of AutoWireup in asp.net?</strong> <br />
AutoEventWireup attribute is used to set whether the events needs to be automatically generated or not.</p>
<p><strong>What base class do all Web Forms inherit from? <br />
</strong>The Page class.</p>
<p><strong>What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?</strong> <br />
You must set the DataSource property and call the DataBind method.</p>
<p><strong>How to give hyperlink to a file in &#8220;asp net&#8221;?</strong> <br />
Use &lt;a href=\&#8221;<a href="file:///hello.txt\">file:///hello.txt\&#8221;&gt;Open</a> file&lt;/a&gt;</p>
<p><strong>What are Codes Refactoring?</strong> <br />
It feature of Visual Web Express.Codes Refactoring Codes Refactoring enables we to easily and systematical makes changes to your code. Code Refactoring is support everywhere that you can writes codes including both code-behind and single-file ASP.NET pages. automatically promote a public field to a full property.</p>
<p><strong>What is ASP.Net Web Matrix?</strong> <br />
This is a free ASP.NET development environment from Microsoft. As well as a GUI development environment, download includes simple web server that can be used instead of IIS to host ASP.NET apps. This opens up ASP.NET development to users of Windows XP Home Edition, which cannot run IIS.</p>
<p><strong>What’s a strong name ?</strong> <br />
A strong name includes the name of the assembly, version number, culture identity, and a public key token.</p>
<p><strong>What’s a bubbled event?</strong> <br />
When you have a complex control, like DataGrid, 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.</p>
<p><strong>What are the different types of sessions in ASP.Net? Name them?</strong> <br />
1.In Proc mode: stores session state in a web server by default.<br />
2.State server mode: stores session state in a separate process called asp.net state services. Ensure that session state is preserved when web application is restarted and make session state available to multiple webservers within a web farm.<br />
3.Sql server mode: stores session state in sql server database. State is preserved when application is restarted and available to multiple webservers.<br />
4.Custom mode: enables you to store a custom session storage provider.<br />
5.OFF mode: disable session state.</p>
<p><strong>Difference between session and cookie?</strong> <br />
Cookies will set the same value for the variable or string throught the whole application when ever it is being run.But session sets or stores the value only till the time period when the application is running once if the application is closed the session value also willl become null.</p>
<p><strong>Explain what a diffgram is? and a good use for one?</strong> <br />
The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a Web Service.</p>
<p><strong>Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process?</strong> <br />
inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe. </p>
<p><strong>How to make Virtual Directory?</strong> <br />
Click “Start &gt; settings&gt; control Panel &gt; Administrative Tools &gt; internet information services”.Expand Internet Information Server. Expand the server name. In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory. . In the first screen of the New Virtual Directory Wizard, type an alias, or name, for the virtual directory (site name), and then click Next. . In the second screen, click Browse. Locate the content folder that you created to hold the Web content. Click Next. In the third screen, click to select Read and Run scripts (such as ASP). Make sure that the other check boxes are cleared. Click Finish to complete the wizard.</p>
<p><strong>Which method do you invoke on the DataAdapter control to load your generated dataset with data? <br />
</strong>The .Fill() method</p>
<p><strong>Where are shared assemblies stored ?</strong> <br />
Global assembly cache.</p>
<p><strong>Can I dynamically set the Image URL for Image Control? A)No B)Yes</strong> <br />
YES Why Not.<br />
Hint: Use eval</p>
<p><strong>How are you Write to XML File ?</strong> <br />
XmlTextWriter textWriter=new XmlTextWriter(&#8217;filename.xml&#8217;);<br />
 <br />
//WriteStartDocument and WriteEndDocument methods open and close a document for writing textWriter.WriteStartDocument()<br />
//write comment text Writer. Write Comment(&#8217;this is my first xml file.&#8217;) textWriter.WriteComment(&#8217;i'm lovin it&#8217;) textWriter.WriteStartElement(&#8217;studentDB&#8217;) //</p>
<p>write first elementtextWriter.WriteStartElement(&#8217;student&#8217;) textWriter.WriteStartElement(&#8217;name&#8217;,&#8221;);<br />
textWriter.WriteString(&#8217;sourabh&#8217;);<br />
textWriter.WriteEndElement();<br />
textWriter.WriterEndElement();<br />
textWriter.WriteEndDocument();<br />
textWriter.Close();<br />
}</p>
<p><strong>Whats the significance of Request.MapPath( )</strong> ?<br />
Maps the virtual path in the requested URL to a physical path on the server for the current request.</p>
<p><strong>What type of code (server or client) is found in a Code-Behind class ? <br />
</strong>Server-side code.</p>
<p><strong>How to connect asp.net with sql server ? <br />
</strong>It can be done through ADO.Net(Connected or Disconnected Architecture).</p>
<p><strong>How long the value session variable has an effect when it not used by the program ? <br />
</strong>20 Minutes.</p>
<p><strong>Where’s global assembly cache located on the system ? <br />
</strong>Usually C:\\winnt\\assembly or C:\\windows\\assembly.</p>
<p><strong>Automatic Memory Management ?</strong> <br />
It&#8217;s entirely too easy for a small mistake to cause a program to chew up memory and crash, sometimes bringing the operating system to a screeching halt in the process. Programmers understand that they&#8217;re responsible for releasing any memory that they allocate, but they&#8217;re not very good at actually doing it. In addition, functions that allocate memory as a side effect abound in the Windows API and in the C runtime library. It&#8217;s nearly impossible for a programmer to know all of the rules. Even when the programmer follows the rules, a small memory leak in a support library can cause big problems if called enough. The .NET Framework solves the memory management problems by implementing a garbage collector that can keep track of allocated memory references and release the memory when it is no longer referenced. A large part of what makes this possible is the blazing speed of today&#8217;s processors. When you&#8217;re running a 2 GHz machine, it&#8217;s easy to spare a few cycles for memory management. Not that the garbage collector takes a huge number of cycles&#8211;it&#8217;s incredibly efficient. The garbage collector isn&#8217;t perfect and it doesn&#8217;t solve the problem of mis-managing other scarce resources (file handles, for example), but it relieves programmers from having to worry about a huge source of bugs that trips almost everybody up in other programming environments. On balance, automatic memory management is a huge win in almost every situation.</p>
<p><strong>What is the base class of the .Net ? <br />
</strong>System.Object.</p>
<p><strong>What technology is used to seperate the code from asp.net page ?</strong> <br />
Partial page class.</p>
<p><strong>True or False: A Web service can only be written in .NET ? <br />
</strong>False</p>
<p><strong>Which template must you provide, in order to display data in a Repeater control ? <br />
</strong>ItemTemplate.</p>
<p><strong>Describe the difference between inline and code behind ?</strong>  <br />
The main difference comes in that inline code is executed at a certain event level in the page lifecycle whether code-behind can be bounded to different levels of events (PreInit, Init, PreLoad, Load, DataBound, Unload, PreRender and so on)<br />
Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.</p>
<p><strong>How can you tell the application to look for assemblies at the locations other than its own install ?</strong> <br />
Use the directive in the XML .config file for a given application.</p>
<p><strong>Which control would you use if you needed to make sure the values in two different controls matched ?</strong> <br />
CompareValidator Control.</p>
<p><strong>Define a transaction. What are acid properties of a transaction ?</strong> <br />
Transaction is a sequence of operation performed as single unit of work. The sequence in which the operation are performed have the importance.<br />
ACID (Atomicity,Consistency,Isolation and Durability) properties of a transaction are as follows:<br />
Atomicity : Either all the operation of the transaction must be completed successfully or none of the operation is done at all.<br />
Consistency: Completion of transaction must have the data in a consistent state.<br />
Isolation: Changes made current transaction must be isolated from any other transaction running simultaneously.<br />
Durability : Once the transaction is complete, it;s changes must persist permanently in the system.</p>
<p><strong>What is the Global.asax used for?</strong> <br />
The Global.asax (including the Global.asax.cs file) is used to implement application and session level events. It resides in the root directory of the application. The .asax file extension signals that it&#8217;s an application file rather than an ASP.NET file that uses aspx. The Global.asax file is the central point for ASP.NET applications. It provides numerous events to handle various application-wide tasks such as user authentication, application start up, and dealing with user sessions. You should be familiar with this optional file to build robust ASP.NET-based applications.</p>
<p><strong>What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?</strong> <br />
You must set the DataSource property and call the DataBind method.</p>
<p><strong>Does ASP.NET supports Linux Environment?</strong> <br />
Mono provides the necessary software to develop and run .NET client and server applications on Linux, Solaris,Mac OS X, Windows, and Unix. Sponsored by Novell, the Mono open source project has an active and enthusiasticcontributing community and is positioned to become the leading choice for development of Linux applications.</p>
<p><strong>Name two properties common in every validation control? <br />
</strong>ControlToValidate property and Text property.</p>
<p><strong>What is the importance of HTML in web applications?</strong> <br />
It is important.But now-a-days due to other languages its use is decreasing.Earlier it was highly used for all sites.</p>
<p><strong>How to attach javascript code into asp.net code?<br />
</strong>Inorder to use script in your asp.net page place the script under head tag of ur aspx source page like this:<br />
&lt;head&gt;<br />
&lt;script type=\&#8221;text/javascript\&#8221;&gt;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;(place the script components here)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
 <br />
Call the script functions from any control events called \&#8221;onclick()\&#8221; or \&#8221;onclientclick()\&#8221;</p>
<p><strong>How ASP .NET different from ASP?</strong> <br />
Difference between ASP and ASP.NET</p>
<p>ASP stands for Active Server Pages. ASP.NET is the next<br />
generation of ASP. After the introduction of ASP.NET, old<br />
ASP is called &#8216;Classic ASP&#8217;.</p>
<p>Classic ASP uses vb script for server side coding. Instead,<br />
ASP.NET supports more languages including C#, VB.NET, J#<br />
etc. VB.NET is very similar to vb script, so it should be<br />
easy for old Visual Basic or ASP programmers to switch to<br />
VB.NET and ASP.NET</p>
<p>VB Script is a simple scripting language, where as VB.NET<br />
or C# are modern, very powerfull, object oriented<br />
programming languages. Just for that reason, you will be<br />
able to write much more robust and reliable programs in<br />
ASP.NET compared to ASP.</p>
<p>In classic ASP, there was no server controls. You have to<br />
write all html tags manually. ASP.NET offers a very rich<br />
set of controls called Server Controls and Html Controls.<br />
It is very easy to drag and drop any controls to a web<br />
form. The VS.NET will automatically write the required HTML<br />
tags automatically for you.</p>
<p>ASP is interpreted, ASP.NET is compiled.</p>
<p><strong>What is difference between Webportal and website?<br />
</strong>A Website is all the pages, images and files contained under a domain name - such as www.happy-online.co.uk<br />
A Web Portal is a type of Website. A Web Portal acts as a gateway to the internet. (A typical dictionary definition of the word portal would be - a doorway or a grand entrance.)<br />
Take the website www.yahoo.com, this is a website, all the pages under the domain www.yahoo.com combine to make the website. However, Yahoo is often referred to as a Web Portal, if you have a look at the Yahoo Website you can see why it has often been called a Portal. The Website acts as a doorway (Portal) to the Internet, from the website you can search the web, go shopping, take part in auctions, read your email etc.</p>
<p><strong>Key differences in features of .NET 2.0 and 3.5? <br />
</strong>.NET 3.5 has more advanced feature than .NET 2.0.They are WCF, WPF, WCS,WF and LINQ</p>
<p><strong>What is cache?</strong><br />
A temporary data storage location, or the process of storing data temporarily. A cache is typically used for quick data access.</p>
<p><strong>How to connect to sql server using windows authentication in asp?<br />
</strong>In &lt;Connection string&gt; of web config file:<br />
Write:<br />
\&#8221;server=servername;datasource=databaseName;IntegratedSecurity=true\&#8221;<br />
Done</p>
<p><strong>What is Remoting?</strong> <br />
Remoting i s communication between  computers which are connect to each other through lan.</p>
<p><strong>What is the .net,why we use .net.what is the advantage to using .net other programming languages? <br />
</strong>.net is not a technology or language .It is an environment to develop an application either web/window/console based.<br />
It provide the ability to achieve versioning.<br />
Remove legacy/dependancy over os end the com based componet.<br />
Can acheieve side by side exceution.</p>
<p><strong>How can you tell the application to look for assemblies at the locations other than its own install? <br />
</strong>Use the directive in the XML .config file for a given application.</p>
<p><strong>Should validation (did the user enter a real date) occur server-side or client-side? Why?</strong> <br />
Client-side. This reduces an additional request to the server to validate the users input.</p>
<p><strong>What is benefit of using grid? <br />
</strong>Main advantage with the grid is we can write bubble events means if we want to place some controls like text box, dropdownlist.To capture those child control events we can write only one single method for column of the grid.</p>
<p><strong>How can i get the next records in gridview by clicking on &#8220;next&#8221;button using asp.net with C#? <br />
</strong>Gridview.selectedindex=girdview.selectedindex+1.</p>
<p><strong>How to pass values from one form to another form?</strong> <br />
We can send information from one form to another using Cookies,Session,POST and GET methods in the form.</p>
<p><strong>You have a query that runs slowly, how would you make it better? <br />
</strong>By creating index for the table to run the query fast and better.</p>
<p><strong>Where do you store the information about the user’s locale? <br />
</strong>System.Web.UI.Page.Culture.</p>
<p><strong>How to select ,edit,delete data through the datagrid control?</strong> <br />
There is a property name called CommandName in the Data Grid row item. With you can differentiate the select wdit and delete.</p>
<p><strong>What does WSDL stand for? <br />
</strong>Web Services Description Language.</p>
<p><strong>What is global.asax?</strong> <br />
Event procegars as to be placed with in specal file called as glob al.asax.</p>
<p><strong>How many config files are there in Asp.net?</strong> <br />
THERE IS ONLY ONE CONFIGURATION FILE i.e web.config file for an application.The web.config file mantains configuration settings of an application.It is written in xml.</p>
<p><strong>How to get the individual control index inside an item template of a datagrid as my item template have more than one web controls?</strong> <br />
Suppose you have many controls in datagrid itemtemplate. If you want to find any of them you can simple follow following synatax<br />
ControlType NameOfControl = e.Item.FindControl(\&#8221;ActualNameofControlInDataGrid \&#8221;) as ControlType.</p>
<p><strong>Example</strong>:<br />
Lets further explain it with example.<br />
Suppose you have a checkbox named \&#8221;chkBoxMessage\&#8221; in your datagrid and you want to find it. You simply write following code.</p>
<p>CheckBox chkBoxMessage = e.Item.FindControl(\&#8221;chkBoxMessage\&#8221;) as CheckBox.</p>
<p><strong>What does the term immutable mean?</strong> <br />
It means to create a view of data that is not modifiable and is temporary of data that is modifiable. Immutable means you can&#8217;t change the currrent data,but if you perform some operation on that data, a new copy is created. The operation doesn&#8217;t change the data itself. Like let&#8217;s say you have a string object having &#8216;hello&#8217; value. Now if you say temp = temp + &#8216;new value&#8217; new object is created, and values is saved in that. The temp object is immutable, can&#8217;t be changed. An object qualifies as being called immutable if its value cannot be modified once it has been created. For example, methods that appear to modify a String actually return a new String containing the modification. Developers are modifying strings all the time in their code. This may appear to the developer as mutable - but it is not. What actually happens is your string variable/object has been changed to reference a new string value containing the results of your new string value. For this very reason .NET has the System.Text.StringBuilder class. If you find it necessary to modify the actual contents of a string-like object heavily, such as in a for or foreach loop, use the System.Text.StringBuilder class. </p>
<p><strong>What is the differences between release and debug in asp.net?</strong><br />
Actually the diffrence between the debug and release mode is, in debug mode the advance version of the .exe file could not replaced while in release mode it is replaced to the new .exe.</p>
<p><strong>How we implement Web farm and Web Garden concept in ASP.NET?At least give an example.</strong><br />
When an application is hosted by multiple processes on the same server it is said to be a web garden environment.Also if an application is hosted by multiple servers then it is said to be web farm environment.</p>
<p><strong>Is it possible to make windows application in asp.net if not then what kind of software use or technique use for making windows application?</strong><br />
We can make windows application on Asp.Net with VB.Net or C#</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dotnettutorial.info/aspnet-interview-questions/25/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introduction to XML</title>
		<link>http://www.dotnettutorial.info/introduction-to-xml/23/</link>
		<comments>http://www.dotnettutorial.info/introduction-to-xml/23/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 16:48:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[XML]]></category>

		<category><![CDATA[asp dotnet]]></category>

		<category><![CDATA[dotnet]]></category>

		<category><![CDATA[microsoft .net]]></category>

		<category><![CDATA[xml]]></category>

		<category><![CDATA[xml programming]]></category>

		<category><![CDATA[xml tools]]></category>

		<category><![CDATA[xml tutorial]]></category>

		<category><![CDATA[xml web services]]></category>

		<guid isPermaLink="false">http://www.dotnettutorial.info/?p=23</guid>
		<description><![CDATA[XML stands for Extensible Markup Language. XML can be used by anyone who is desirous of using web technologies to distribute information across the Internet or the intranet.
XML is another form of formatting a document with a web browser. XML is an powerful and effective tool for processing the contents of a document. In other [...]]]></description>
			<content:encoded><![CDATA[<p>XML stands for Extensible Markup Language. XML can be used by anyone who is desirous of using web technologies to distribute information across the Internet or the intranet.</p>
<p>XML is another form of formatting a document with a web browser. XML is an powerful and effective tool for processing the contents of a document. In other words XML allows you to create your own tags. XML is a very simple and flexible markup language that can be used on any operating system or environment.</p>
<p>XML is also platform independent that is XML can run on any operating system. XML is a better form of describing the contents of a document to the user. XML allows the exchange of data on the web more easily and efficiently. XML does this by allowing the users to develop their own (DTD’s)</p>
<p>DTD’s are used for describing sets of tags and attributes to display the content in a desired format. XML vocabularies or applications are called as the individual markup language that is defined using DTD’s.</p>
<p>Genealogical Markup Language (GedML) and the Chemical Markup Language (CML) are the examples of XML vocabularies. GedML describe ancestral data and CML describes chemical formulas and molecules. XML is an extensive language that is not only used for describing data but is also used for describing metadata. Metadata means data about data. In a nutshell, XML is an effective method of describing data and Metadata that is platform independent and that it can be used on all operating systems.</p>
<p>XML is a subset of SGML. Its aim is to provide generic SGML to be served, received and processed on the web. XML has been designed for the interoperability with both SGML and HTML.</p>
<p>XML documents are made up of entities that are called as storage units. Some of them are parsed data and the others are unparsed data. XML enables a mechanism to provide constraints on the storage layout.</p>
<p><strong>Is XML a database?<br />
</strong>XML document is a collection of data. In other words it doesn’t make much difference between the other files that store data. A XML in a database format is a self describing, portable, and can describe data in tree or graph structure. XML is a sort of Database Management System (DBMS).</p>
<p>XML provides storage, schemas, query languages, programming interfaces and so on .It lacks in triggers, queries, multi-user access that a real database constitutes. The main advantage of XML is that the data is portable and it allows you to have nested entries.</p>
<p>XML allows you to preserve physical document structure, supports document level transactions and execute queries in an XML query language.</p>
<p>Mapping the XML document schema to the database schema does the transfer of data between XML documents and a database. Mappings between document schemas and database schemas are performed on attributes and text. There are 2 mappings that are generally used to map on XML document schema to the database schema:</p>
<p>1.TABLE BASED MAPPING<br />
2.OBJECT RELATIONAL MAPPING</p>
<p>Native XML databases are designed especially to store XML documents .It is always possible to store data in XML documents in a native XML database. This is done so, when your data is semi-structured. Although, this kind of data can be stored in object oriented and hierarchical databases, it is always better to store it in a native XML database. It enables us to retrieve data much faster than a relational database. One more reason is to store data in a native XML database is to exploit XML specification capabilities, such as executing XML queries.</p>
<p><strong>Using Stylesheets in XML</strong><br />
XML is a means of exchanging data between applications. It allows the developers to describe and structure their data in their own formats. As the XML gave more emphasis on data rather than formatting, the data in the XML document can be formatted in two ways:</p>
<p>1. USING CSS<br />
2. USING XSL</p>
<p><strong>Cascade Style Sheet( CSS)</strong>:</p>
<p>Initially, Cascading Style sheets (CSS) were used for formatting the data in the XML documents. It allows the Web Developers to define a formatting for the elements in XML and the same can be applied to as many documents you like. The advantages are:</p>
<p>1.It has a Precise control over presentation<br />
2.It is Resolution Independent<br />
3.It downloads Faster<br />
4.It is easy to maintain</p>
<p>Though it has a lot of advantages it also has following disadvantages.</p>
<p>1. The order of elements for display cannot be changed<br />
2. An element cannot be processed more than once.<br />
3. Generated text cannot be added to the presentation</p>
<p><strong>USING eXtesible Stylesheet Language (XSL):</strong></p>
<p>The difficulties that were encountered with CSS were removed by making use of XSL. XSL is an application of XML It allows you to create high performance XML based systems by integrating Server side XML processing’s. The need for transforming data from one format to the other results in splitting XSL into two groups:</p>
<p>i) XSLT – It describes how to transform XML. Document into other formats.<br />
ii) XSL-FO- It describes formatting details of each element in the XML document.</p>
<p>i) XSLT:</p>
<p>The XML Style sheet Language Transformation (XSLT) is a mechanism of transforming one form of XML documents to the other form. It is a set of templates based on Xpath expressions that tells how to fetch a particular node from the XML documents. It is a part of XSL, which is a style sheet language for XML. XSLT is widely used in Websites Content Management to convert XML into HTML pages. It uses Xpath to define parts that match one or more templates. Xpath is an query language that allows you to identify the nodes. It can select nodes in any direction. An XSLT processor is used to perform transformations of XML document in to other formats based on the given XSLT document.</p>
<p>ii) XSL_FO:</p>
<p>XSL-FO means Extensible Formatting Objects. There are two different ways in which the XML document can be formatted. They are:</p>
<p>1. Layout Based formatting and <br />
2. Content Based formatting</p>
<p>In a layout based formatting, the limitations of the target may constrain the content or appearance on the page, whereas in a Content Based Formatting, the target medium is generated to accommodate the information being formatted. The XSL FO allows you to make formatting and styling options to your document.</p>
<p><strong>Working with XML using ASP</strong><br />
The need for manipulating XML on the server increases as the need for XML increases.XML and ASP are a very efficient and a powerful combination.XML is a simple and a powerful tool for web developers.XML was created to handle complex Web documents. XML allows you to define all your own tags with rules such as data description and data relationships. XML is used in order to remove the cumbersome problems that were faced with HTML. Information can be accessed easier using XML. ASP and XML are powerful tools for creating dynamic web pages.</p>
<p>ASP uses XML as a tool in its application for a simple reason that data in HTML is allowed to transmit between dissimilar platforms, whereas XML allows us to express complex structure. Moreover it allows us to create our own tags with all sorts of rules. A new document instance can be created using MSXML.There are a number of ways to access XML data from an ASP page. Document Object Model (DOM) plays an important role in retrieving the XML data from ASP. In DOM a document is viewed as a tree of nodes. Every node of the tree can be accessed randomly. The main advantage is that it provides all functions in an Object based way.An XML parser based on DOM from Microsoft is MSXML.This component is used for accessing the XML documents.</p>
<p>There are two groups of DOM programming interfaces.The first group defines interfaces required for writing the application. The second group defines interfaces that are required to assist developers. Once the DOM Object is created on the server, your own XML document can be created. The XML document can be easily parsed on the server in an ASP and then the results can be sent to the client.</p>
<p><strong>Accessing XML using Java Technologies</strong><br />
The most important benefit of XML is its simplicity. Though it is simple it is powerful enough to express complex data structures. Java is one of most important programming languages that is used for creating your web pages. It is an object oriented language whose main purpose was to be used with embedded systems such as cell phones. But later it gained more importance to be used with Web pages that were dynamic in nature. Java Applet and servelets are the important mechanisms for implementing this.</p>
<p>Another advantage of using Java is the concept of JavaBeans, which is a software component model for Java that allows the rapid development of an application by using a visual buider.DOM is one of the methods for accessing the structure of an XML document. An alternative is to use an event driven API.SAX is a simple API designed for XML.DocumentHandler is very important since it is called every time an element is found. A DocumentHandler is used as follows:</p>
<p>Step 1: Importing the parser interface<br />
Step 2: Create an instance of SAX driver.<br />
Step 3: Using this driver, create a parser object<br />
Step 4: Register an instance of class MyHandler as a DocumentHandler.</p>
<p>JOX is a set of Java libraries that allows you to transfer data between XML documents and JavaBeans. JOX matches XML document to the fields of a bean and it will use a DTD when writing an XML document when one is available.JOX, unlike the other libraries, allows you to use any form of an XML document and any JavaBean without creating a separate schema to describe the mapping between Java and XML.</p>
<p>XP is an XML parser written in Java. The following are the advantages of XP:</p>
<p>1.XP is designed to be 100% conformant and correct<br />
2.XP aims at High performance<br />
3.Apart from the high level parser API, it also provides a low level API that supports the construction of different kinds of parser.</p>
<p>Breeze XML Binder is the most complete Java/XML data binding solution available. Breeze creates JavaBeans directly created from the XML structures.</p>
<p><strong>XML Editor</strong><br />
XML editor allows you to take input and save files. XML editor is a text editor to create DTD’s and XML documents. Some editors check the XML documents whether it conforms to the rules of XML. The term XML EDITOR refers to the different types of tools depending on the purpose for which it is been used. There are a number of XML editors available in the market.</p>
<p>A few of the XML editors with their detailed descriptions are given below:</p>
<p>1.XMLmind XML Editor<br />
The XML mind XML Editor (XXE) has been used with the word processor like view without the help of a tree view or visible tags. This allows concentrating more on content creation. XXE is a very efficient and powerful tree view that allows us to open XML documents for which CSS style sheet is not available. XXE helps in editing the XML data and document by embedding standard controls in the word processor like tree view. XMLmind XML Editor is easy to deploy and are highly extensible, which is a very indispensable feature that is more important than a word processor.</p>
<p>2.Peter’s XML Editor<br />
The version 2.0 of this Peter’s XML Editor is a major development to this tool. The Peter’s XML editor uses a new XML parser, which is more powerful than previously used. The new tree view is much faster and powerful. The new source view allows the better editing of Unicode files.</p>
<p>3.VIM as XML Editor<br />
It is a great and an extensible XML editor with many features. It is a highly efficient text XML editor built to enable text editing. VIM is called “PROGRAMMER’S EDITOR” and so it is useful programming that may consider it is an entire IDE. Not only for programmer’s, it is also perfect for all text editing.</p>
<p>4.oXygen XML Editor<br />
This XML editor is a simple and elegant one combined with XML editing features, which has made it popular in both the corporate and academic worlds. The oXygen XML editor provides tools for document creation and presentation that can be validated against any user defined schema. The context sensitive editing minimizes the validation errors. The oXygen XML editor 4.0 provides a special layout when entering the debugging mode.</p>
<p>5.Exchanger XML Editor<br />
This is a Java based XML Editor that enables easy browsing, managing and editing. It offers an extensive functionality to help XML authors, business analysis and software developers.</p>
<p>6.XML SPY EDITOR<br />
Of all the XML editors, XML SPY tops as XML editor. It is a graphical schema editing and user interface that impresses the user with its versatility and power.</p>
<p><strong>XML Parser</strong><br />
XML parser is a software module to read documents and a means to provide access to their content. XML parser generates a structured tree to return the results to the browser. An XML parser is similar to a processor that determines the structure and properties of the data. An XML parser can read a XML document to create an output to generate a display form.</p>
<p>There are a number of parsers available and a few of them are listed below:</p>
<p>1.The Xerces Java Parser<br />
The main applications of the Xerces Java parser is the building up of the XML-savvy web servers<br />
and to ensure the integrity of e-business data expressed in XML.</p>
<p>2.expat XML parser<br />
The expat XML parser is written in C and runs on UNIX or W32.The expat XML parser is not a validating processor that is you can use it only to write an XML parser. This parser is contributed by James Clark.</p>
<p>3.XP and XT<br />
XP is a Java based, XML validating parser and XT is an XSL processor. Both are written in Java.XP detects all non well formed documents. It gives high performance and aims to be the fastest conformant XML parser in Java. On the other hand XT is a set of tools for building program transformation systems. The tools include pretty printing; bundling of systems, tree transformation etc,</p>
<p>4.SAX<br />
Simple API for XML (SAX) was developed by the members of a public mailing list (XML-DEV).It gives an event based approach to XML parsing. It means that instead of going from node to node, it goes from event to event. SAX is an event driven interface. Events include XML tag, detecting errors etc,</p>
<p>5.XML pull parser<br />
It is optimal for applications that require fast and a small XML parser. It should be used when all the process has to be performed quickly and efficiently to input elements.</p>
<p>6.XML parser for Java<br />
It runs on any platform where there is Java virtual machine. It is sometimes called XML4J.It has an interface which allows you to take a string of XML formatted text, pick the XML tags and use them to extract the tagged information.</p>
<p><strong>XML RPC<br />
</strong>XML RPC is a Remote Procedure Calling via the Internet. XML RPC is a network programming technique for making procedure calls on remote devices. Generally, XML RPC is used for developing Web services. XML RPC messages are the requests and the responses sent between the client and the servers. XML RPC is platform independent.</p>
<p>It is a message in the HTTP POST Request. The body of the Procedure is in XML and the value it returns is also in the form of an XML.It is designed as simple as possible but it allows complex data structures to be transmitted, analysed, and returned.</p>
<p>XML RPC is a protocol that allows different languages on different machines to communicate with each other. Since procedure requests and responses are in XML it is not necessary that each end of the RPC connection have to be written in the same language. XML RPC is the simplest tool that allows you to integrate even the most communicative tools. XML RPC can transport binary data as base64.</p>
<p>XML RPC has 8 datatypes. They are as follows:</p>
<p>1. INT<br />
2. BOOLEAN<br />
3. DOUBLE<br />
4. STRING<br />
5. BASE64<br />
6. ARRAY<br />
7. STRUCT<br />
8. DATE/TIME</p>
<p>An array type is an indexed array and the STRUCT is a kind of associative array.<br />
XML_RPC.NET is one of the libraries for XML RPC clients and services.</p>
<p>Listed below are few of its features:</p>
<p>1.Support for .NET on both Client and Server side.<br />
2. Interface based definition of XML-RPC servers and clients<br />
3. ASP.NET services that support both SOAP and XML RPC<br />
4. Dynamic generation of documentation page at URL of XML-RPC<br />
5. XML RPC.NET defines services as services running on the Microsoft IIS servers.</p>
<p><strong>XML Schema</strong><br />
An XML Schema defines the elements, child elements and the attributes that can appear in a document. It can also define the order, the number of child elements, the data types for elements and attributes. In DBMS, Schema is a description of a database structure. Internal structures such as tables and fields can be defined using schemas. Schema defines tables and fields that make up the data. Schemas are defined using constraints.</p>
<p>There are two types of constraints:</p>
<p>1. CONTENT CONSTRAINTS<br />
2. DATATYPE CONSTRAINTS</p>
<p>An XML schema is a set of schema components in which there are 13 kinds of grouped components under 3 categories primary, secondary and helper components.</p>
<p>The primary components include</p>
<ul>
<li> SIMPLE TYPE DEFINITIONS</li>
<li> COMPLEX TYPE DEFINITIONS</li>
<li> ATTRIBUTE TYPE DEFINITIONS</li>
<li> ELEMENT DECLARATIONS</li>
</ul>
<p>An XML schema consists of components such as type definitions and element declarations. They are used to access the validity of the well-formed element and attribute information items.<br />
The purpose of XML schema structures schema describes a class of XML documents by using schemas components. Schemas provide specifications and additional information such as normalization and element values. Thus, XML schemas can be used to describe and catalogue XML documents. The XML schema validators allow us to check whether the instance of an document meets the requirements. The XML data can be described and validated using the XSD (XML Schema Editor). XSD is written in XML, so it doesn’t require a parser.</p>
<p><strong>XML Tools</strong><br />
XML tools allows the developers to produce XML in a wide variety of situations such as comparing two documents, validating the XML documents, to check whether a file is well formed, etc., There are a lot of tools available, including those tools for creating and editing XML or building e-commerce applications.</p>
<p>A few of the tools are listed below:</p>
<p>1.Microsoft XML Diff and Patch<br />
It is a set of tools that will allow you to compare two XML documents. It detects addition, deletion and detects the changes between two XML documents. It ignores order attributes, insignificant white spaces, and it doesn’t care about document coding. These tools if used on a structured data leads to suboptimal results, since they don’t have the capacity of recognizing the tree based structure.</p>
<p>2.XSD schema validator<br />
This allows the validation of XML documents against an W3C XML schema or XML data reduced schema. It checks whether the given document is well formed and has a valid schema model.</p>
<p>3.Microsoft XSD interference 1.0<br />
Allows you to create an XML schema definition language if a well formed XML file is available, then it generates an XSD that can validate that XML file.</p>
<p>4.XML CONTENT TOOLS<br />
The XML content tools allow us to create edit and publish XML.The XML content tools were originally designed for publishing needs. XML pro from vervet logic is another relatively cheap and worth XML editing tool. The user interface helps you to make quick work.</p>
<p>5.XMetaL<br />
XMetaL from SoftQuad is another affordable tool designed to make quick work of creating and editing files. It is a set of tools designed to simplify the implementation of XML applications. Two companies offer XML application tool kits. It enables you to deliver the contents in a short time to multiple channels, reduces complexity and cost of content. It supports DOM that includes extensive documentation. It also supports COM.</p>
<p>6.Breeze Commerce Studio<br />
Bluestone software offers Breeze Commerce studio for creation of XML and Java based applications. It imports schema from XML DTD’s, XML documents and JDBC/ODBC databases.<br />
It allows us to add data types and constraints to the elements of the schema.</p>
<p>7.Standalone and Single User content tools<br />
Standalone, singleuser XML content tools are very cheap, since they require the least amount of development time and effort. If you have to handle XML creating, editing and publishing for print, web, investigate the product lines of Abortext and interleaf. RAD XML persistent tools are used for easy process, display and share complex data across applications with minimum co