Stored procedure helps to make your work easy. With the help of these you just have to supply some parameters only.
The Code snippet using storedprocedures describes a way to use stored procedures.
Stored procedure helps to make your work easy. With the help of these you just have to supply some parameters only.
The Code snippet using storedprocedures describes a way to use stored procedures.
Whenever you have to update more than one table or destinations then it must have to sure that the operation done successfully because some time it has been seen that one table updated but due to some error another(s) not. To overcome this problem you have Transactions.
In ADO.Net transactions are initiated by calling BeginTransaction() methods on the database connection object.
Isolation Level(s) | Description |
ReadCommitted | Its default for SQL Server. It ensures that data written by one transaction will only be accessible in a second transaction after the first transaction commits. |
ReadUnCommitted | It permits transaction to read data within the database, even data that have not yet been committed by another transaction. |
RepeatableRead | It extends the ReadCommitted level, ensures that if the same statement issued within the transaction, regardless of other potential updates made to the database, the same data will always be returned. |
Serializable | It is the most exclusive transaction level, which in effect serializes access to data within the database. With this level, phantom rows can never show up, so a SQ statement issued within a serializable transaction will always retrieve the same data. |
Bellow is the code snippet to show transaction in action:
string myConStr = "server=(local); integrated security=SSPI;database=HRnPAYROLL";
using (SqlConnection myCon = new SqlConnection(myConStr))
{
//Open connection object
myCon.Open();
SqlTransaction nTran = myCon.BeginTransaction();
//some code for work
nTran.Commit();
}
Using private assembly.
Important:Version information of an assembly is stored in its MANIFEST
: Concept of Versioning is applicable only to GAC [Global Assembly Cache], because
private assemblies are lying in their individual folders.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; // General Information about an assembly is
controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("privateAssembly")]
[assembly: AssemblyDescription("This is an Example of Book: C#-A Step Ahead
Series")]
[assembly: AssemblyConfiguration("Free I.T. Education Series - A Step Ahead")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("A Step Ahead Series")]
[assembly: AssemblyCopyright("Copyright © A Step Ahead 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d5389a36-3aa1-4e22-b3df-4cacd5e96531")]
To view the assembly means to view the IL code, ILDASM converts the whole exe or
dll into IL Code. To start the same:
|