Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/theme.php on line 507

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-content/plugins/codesnippet/codesnippet.php on line 248
Tryangled Dev » 2008 » May

Archive for May, 2008

What is the difference between delegate and event?

Tuesday, May 20th, 2008

An event offers more restricted access than a delegate. When an event is public, other classes are only able to add or remove handlers for that event: such classes cannot—necessarily—fire the event, locate all the handlers for it, or remove handlers of which they are unaware.

Posted by Mahesh ( Tryangled )

What is the difference between const and static readonly?

Monday, May 19th, 2008

The difference is that the value of a static readonly field is set at run time, and can thus be modified by the containing class, whereas the value of a const field is set to a compile time constant.
In the static readonly case, the containing class is allowed to modify it only
* in the variable declaration (through a variable initializer).
* in the static constructor (instance constructors, if it’s not static) .
static readonly is typically used if the type of the field is not allowed in a const declaration, or when the value is not known at compile time.

Posted by Mahesh ( Tryangled )

what is use of Transactional Replication in sql server?

Monday, May 19th, 2008

Transactional replication typically starts with a snapshot of the publication database objects and data. When the initial snapshot is taken, subsequent data changes and schema modifications made at the Publisher are usually delivered to the Subscriber as they occur.

Transactional replication is typically used in server-to-server environments and is appropriate in each of the following cases:
* You want incremental changes to be propagated to Subscribers as they occur.
* The application requires low latency between the time changes are made at the Publisher and the changes arrive at the Subscriber.
* The Publisher has a very high volume of insert, update, and delete activity.
* The Publisher or Subscriber is a non-SQL Server database, such as Oracle.

Posted by Mahesh ( Tryangled )

How to select dataset or data reader?

Saturday, May 17th, 2008

The data reader is more useful when you need to work with large number of tables, database in non-uniform pattern and you need not execute the large no. of queries on few particular table.When you need to work on fewer no. of tables and most of the time you need to execute queries on these fewer tables, you should go for the dataset.
If multiple users are using the database and the database needs to be updated
every time, you must not use the dataset. For this, .Net provides the connection oriented architecture. But in the scenarios where instant update of database is not required, dataset provides optimal performance by making the changes locally and connecting to database later to update a whole batch of data. This also reduces the network bandwidth if the database is accessed through network.

Disconnected data access is suited most to read only services. On the down side, disconnected data access architecture is not designed to be used in the networked environment where multiple users are updating data simultaneously and each of them needs to be aware of current state of database at any time (e.g., Airline Reservation System).

Posted by Mahesh ( Tryangled )

What does it mean by disconnected data access architecture of ADO.Net?

Saturday, May 17th, 2008

ADO.Net introduces the concept of disconnected data architecture. In traditional data access components, you make a connection to the database system and then interact with it through SQL queries using the connection. The application stays connected to the DB system even when it is not using DB services. This commonly wastes the valuable and expensive database resource as most of the time applications only query and view the persistent data. ADO.Net solves this problem by managing a local buffer of persistent data called data set. Your application automatically connects to the database server when it needs to pass some query and then disconnects immediately after getting the result back and storing it in dataset. This design of ADO.Net is called disconnected data architecture and is very much similar to the connection less services of http over the internet. It should be noted that ADO.Net also provides the connection oriented traditional data access services.

Posted by Mahesh ( Tryangled )

How to filter the data using Data View Manager in VB.NET?

Saturday, May 17th, 2008

Individual DataViews can be defined to sort or filter the data in each DataSet table. If the DataSet contains multiple tables, an alternative is to create a DataView manager (a DataViewManager object). The DataView manager works something like a dataset-wide
data view. It provides a single object that manages a collection of DataViews, each of which is associated with a specific table in a dataset. To use a DataView manager, the user must create and configure it in code. There is no design-time object that can be added to a form or component. This means that controls are bound to the DataView manager in code, as there is no design-time component to bind them to.
The following project will illustrate the filtering and sorting of the data.

1. Create a new Windows application project.
2. Add three labels, one DataGridView, one ComboBox and a button to the Form
3. And arrange them as shown in the screenshot below
4. Now go to the following steps.
1. Create a SqlConnection object whose constructor will take the connectString as the parameter.
2. Create SqlDataAdapter whose constructor will take the SqlStatement and the connection object as parameters.
3. Instantiating a DataSet and a DataView.
4. Call the fill method of the SqlDataAdapter and fill the DataSet.
5. Create a view.
6. To the ComboBox add the name of the table columns are to be sorted on.
7. Instantiate a DataView object that will be based on the DataSet table
8. Call the sort method of dataview from within the EventHandler of ComboBox selectedIndexChanged.
9. Press F5 to execute the code.

Posted by Mahesh ( Tryangled )

Fortune With Nouveau Riche

Saturday, May 17th, 2008

The Nouveau Riche University is the great place to learn more about business and also other activity that related to the business. You may find the glory by joining this university because this university is aimed to create their students able to face the challenge in the future business and show them job opportunity that are suitable for them.

Where plenty of people fail in managing their business because they are not suitable for this business from the first time and they do not have any trick to operate their business. The success story about Nouveau Riche University and its graduation are able to be found in money.cnn.com which tells the entire people in this world about the great business news.

Everybody knows that Nouveau Riche University is giving help to its student to reach the glory by studying more about business trick because the word riche it self means the person that rise from poverty to wealth or it means sometimes from the obscurity to fame. You may found the meaning of that word in the en.wikipedia.org and the result will be matched.

The Nouveau Riche University is the most suitable place to learn more about business and find out the most suitable job opportunity for you future. Join this university and you will be able to grab your future fortune.

Posted by Mahesh ( Tryangled )

What is a Manifest?

Thursday, May 15th, 2008

An assembly manifest contains all the metadata needed to specify the assembly’s version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information. The following table shows the information contained in the assembly manifest. The first four items the assembly name, version number, culture, and strong name information make up the assembly’s identity.

Posted by Mahesh ( Tryangled )

What is managed code and managed data?

Thursday, May 15th, 2008

Managed code is code that is written to target the services of the Common Language Runtime.In order to target these services, the code must provide a minimum level of information (metadata) to the runtime.All C#, Visual Basic .NET, and JScript .NET code is managed by default.Visual Studio .NET C++ code is not managed by default, but the compiler can produce managed code by specifying a command-line switch (/CLR).

Closely related to managed code is managed data–data that is allocated and de- allocated by the Common Language Runtime’s garbage collector. C#, Visual Basic, and JScript .NET data is managed by default.C# data can, however, be marked as unmanaged through the use of special keywords.Visual Studio .NET C++ data is unmanaged by default (even when using the /CLR switch), but when using Managed Extensions for C++, a class can be marked as managed using the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector.In addition, the class becomes a full participating member of the .NET Framework community, with the benefits and restrictions that it brings. An example of a benefit is proper interoperability with classes written in other languages (for example, a managed C++ class can inherit from a Visual Basic class).
An example of a restriction is that a managed class can only inherit from one base class.

Posted by Mahesh ( Tryangled )

What is “Common Language Runtime” (CLR)?

Thursday, May 15th, 2008

CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that converts a MSIL code into the host machine.
language code, which is then executed appropriately. The CLR is the execution engine for .NET Framework applications. It provides a number of services, including:
- Code management (loading and execution)
- Application memory isolation
- Verification of type safety
- Conversion of IL to native code.
- Access to metadata (enhanced type information)
- Managing memory for managed objects
- Enforcement of code access security
- Exception handling, including cross-language exceptions
- Interoperation between managed code, COM objects, and pre-existing DLL’s (unmanaged code and data)
- Automation of object layout
- Support for developer services (profiling, debugging, and so on).

Posted by Mahesh ( Tryangled )