Trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. DML triggers execute when a user tries to modify data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, or DELETE statements on a table or view. These triggers fire when any valid event is fired, regardless of whether or not any table rows are affected. For more information Types of DML Triggers AFTER trigger AFTER triggers are executed after the action of the INSERT, UPDATE, MERGE, or DELETE statement is performed. AFTER triggers are never executed if a constraint violation occurs INSTEAD OF trigger INSTEAD OF triggers override the standard actions of the triggering statement. Therefore, they can be used to perform error or value checking on one or more columns and the perform additional actions before insert, updating or deleting the row or rows. For example, when the value being updated in ...
ADO.NET entity is an ORM (object relational mapping) which creates a higher abstract object model over ADO.NET components. So rather than getting into dataset, datatables, command, and connection objects as shown in the below code, you work on higher level domain objects like customers, suppliers, etc. DataTable table = adoDs.Tables[ 0 ]; for ( int j = 0 ; j < table.Rows.Count; j++) { DataRow row = table.Rows[j]; // Get the values of the fields string CustomerName = ( string )row[ " Customername" ]; string CustomerCode = ( string )row[ " CustomerCode" ]; } Benefits of using EF The main and the only benefit of EF is it auto-generates code for the Model (middle layer), Data Access Layer, and mapping code, thus reducing a lot of development time. The importance of EDMX file in Entity Framework EDMX (Entity Data Model XML) is an XML file which contains all the mapping details of how your objects map ...
I have worked on desktop application, in this application is using for image capturing in desktop or tablet. I had found one problem is that camera was not rotate. I have using video capturing device in desktop-pc like as webcam and in the table have rear and front camera.Webcam not require rotation but in tablet is rotation require because tablet is rotate landscape to portrait or landscape or landscape-flipped vis versa. So I had decided when system is tablet then camera is rotate else not.I had using blow code for system is tablet. I have write this post for identify the user's device is desktop-pc or tablet. I have wrote some snippet code's Using the name space in in winform.... using System.Runtime.InteropServices; snippte code using is tablet is identify private static readonly int SM_TABLETPC = 0x56; [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto, EntryPoint = "GetSystemMetrics")] pri...
Comments
Post a Comment