Archive for May 19th, 2008

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 )