<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5072326839914180829</id><updated>2011-05-16T06:12:28.026-07:00</updated><title type='text'>.Net Web Development Solutions</title><subtitle type='html'>This blog provide best solutions for your web development problems. Just put your web development related problems and we will provide you a best solutions. This could be one of the best ways to share and get your knowledge to each others.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://webdevsolutions.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://webdevsolutions.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dinesh Singh</name><uri>http://www.blogger.com/profile/08880477320643579956</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5072326839914180829.post-78550743649889963</id><published>2008-07-28T11:31:00.000-07:00</published><updated>2008-07-28T11:34:09.136-07:00</updated><title type='text'>Know More About Sql Server</title><content type='html'>Timstamp Transaction:Informal&lt;br /&gt;Whenever a transaction starts, it is given a timestamp. This is so we can tell which order that the transactions are supposed to be applied in. So given two transactions that affect the same object, the transaction that has the earlier timestamp is meant to be applied before the other one. However, if the wrong transaction is actually presented first, it is aborted and must be restarted.&lt;br /&gt;Every object in the database has a read timestamp, which is updated whenever the object's data is read, and a write timestamp, which is updated whenever the object's data is changed.&lt;br /&gt;If a transaction wants to read an object,&lt;br /&gt;• but the transaction started before the object's write timestamp it means that something changed the object's data after the transaction started. In this case, the transaction is cancelled and must be restarted.&lt;br /&gt;• and the transaction started after the object's write timestamp, it means that it is safe to read the object. In this case, if the transaction timestamp is after the object's read timestamp, it is set to the transaction timestamp.&lt;br /&gt;If a transaction wants to write to an object,&lt;br /&gt;• but the transaction started before the object's read timestamp it means that something has had a look at the object, and we assume it took a copy of the object's data. So we can't write to the object as that would make any copied data invalid so the transaction is aborted and must be restarted.&lt;br /&gt;• and the transaction started before the object's write timestamp it means that something has changed the object since we started our transaction. In this case we use the Thomas Write Rule and simply cancel our transaction and continue as normal; it does not have to be restarted.&lt;br /&gt;• otherwise, the transaction writes to the object, and the object's write timestamp is set to the transaction's timestamp.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Normalization:&lt;br /&gt;In relational databases, normalization is a process that eliminates redundancy, organizes data efficiently, and reduces the potential for anomalies during data operations and improves data consistency. The formal classifications used for quantifying "how normalized" a relational database are called normal forms (abbrev. NF).&lt;br /&gt;A non-normalized database is vulnerable to data anomalies because it stores data redundantly. If data is stored in two locations, but later is updated in only one of the locations, then the data is inconsistent; this is referred to as an "update anomaly". A normalized database stores non-primary key data in only one location.&lt;br /&gt;Normalized databases have a design that reflects the true dependencies between tracked quantities, allowing quick updates to data with little risk of introducing inconsistencies. Instead of attempting to lump all information into one table, data is spread out logically into many tables.&lt;br /&gt;Denormalization&lt;br /&gt;Databases intended for Online Transaction Processing (OLTP) are normalized. OLTP Applications are characterized by a large number of small transactions like updating a sales record at a super market checkout counter. The expectation is to complete the transaction as quickly as possible. By contrast, databases intended for On Line Analytical Processing (OLAP) operations are primarily "read only" databases. OLAP applications tend to extract historical data, that has accumulated in the project for quite a long time. For such databases, redundant or "denormalized" data may facilitate Business Intelligence applications. Specifically, dimensional tables in a star schema often contain denormalized data. The denormalized or redundant data must be carefully controlled during ETL processing, and users should not be permitted to see the data until it is in a consistent state. The normalized alternative to the star schema is the snowflake schema.&lt;br /&gt;Also denormalization is often used to improve performance on smaller computers as in computerized cash-registers. Since these use the data for look-up only, no changes are to be made in the table (PLU) and a swift response is crucial. Therefore these computers use a "flat file", i.e. a denormalized database (or at least, a part of one).&lt;br /&gt;[edit]&lt;br /&gt;History&lt;br /&gt;Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form in his paper A Relational Model of Data for Large Shared Data Banks Communications of the ACM, Vol. 13, No. 6, June 1970, pp. 377-387[1].&lt;br /&gt;Normal Forms&lt;br /&gt;One can only describe a database as having a normal form if the relationships between quantities have been rigorously defined. It is possible to use set theory to express this knowledge once a problem domain has been fully understood, but most database designers model the relationships in terms of an "idealized schema". (The mathematical support came back into play in proofs regarding the process of transforming from one form to another.)&lt;br /&gt;Edgar F. Codd originally established three normal forms:&lt;br /&gt;• First normal form (1NF)&lt;br /&gt;• Second normal form (2NF)&lt;br /&gt;• Third normal form (3NF)&lt;br /&gt;The first normal form basically states that an attribute can only store one value. The second and third normal forms deal with the relationship of non-key attributes to the primary key.&lt;br /&gt;In practice, most applications in 3NF are fully normalized. However, later research identified potential update anomalies in 3NF databases. BCNF is one such further refinement.&lt;br /&gt;The fourth and fifth normal forms (4NF and 5NF) deal specifically with the relationship of attributes comprising a multi-attribute primary key. Sixth normal form (6NF) only applies to temporal databases.&lt;br /&gt;[edit]&lt;br /&gt;Non-First Normal Form (NF²)&lt;br /&gt;The non-first normal form extends the first normal form as it "allows sets and sets of sets to be attribute domains" (Schek 1982). It is therefore non-first normal as the first normal form states that attribute domains must be atomic. This extension introduces hierarchies in relations.&lt;br /&gt;Consider the following table:&lt;br /&gt;Non-First Normal Form&lt;br /&gt;Non-First Normal Form&lt;br /&gt;Person Favorite Colors&lt;br /&gt;Bob blue, red&lt;br /&gt;Jane green, yellow, red&lt;br /&gt;Assume a Person has several favorite colors. Obviously favorite colors consist of a set of colors which is modelled by the given table.&lt;br /&gt;To transform this NF² table into a 1NF an "unnest" operator is required which extends the relational algebra of the higher normal forms. The reverse operator is called "nest" which is not always the mathematical inverse of "unnest", although "unnest" is the mathematical inverse to "nest". Another constraint is required for the operators to be bijective which is covered by the Partitioned Normal Form (PNF)&lt;br /&gt;[edit]&lt;br /&gt;First normal form&lt;br /&gt;What is 1NF?&lt;br /&gt;The domain of attribute must include only atomic (simple, indivisible) values.&lt;br /&gt;&lt;br /&gt;To understand first normal form (1NF), consider these two examples of things you might know:&lt;br /&gt;"What is your favorite color?"&lt;br /&gt;"What food will you not eat?"&lt;br /&gt;A difference between these two questions is that, while you can have only one favorite color, there may be many foods you do not eat.&lt;br /&gt;In "1NF"; every attribute in a relation must be atomic. That is to say that there can be no composite attributes in the relation. Data that has a single value such as "person's favorite color" is inherently in first normal form. Such data can be stored in a single table with a simple key/value combination. Data that has multiple values, however, must be stored differently.&lt;br /&gt;Codd argued that there was one best way to keep multi-valued data such as "food a person will not eat." He suggested that the database should contain a separate table for the multi-value data and then store each food as a separate row in that table. Known as first normal form, this approach has been a standard for decades. An example of data in proper first normal form follows:&lt;br /&gt;Table 1&lt;br /&gt;Person Favorite Color&lt;br /&gt;Bob blue&lt;br /&gt;Jane green&lt;br /&gt;Table 2&lt;br /&gt;Person Foods Not Eaten&lt;br /&gt;Bob okra&lt;br /&gt;Bob brussels sprouts&lt;br /&gt;Jane peas&lt;br /&gt;Database systems when Codd was writing were relatively primitive. Newer databases now support abstract data types and other data-storage methods that usually offer better performance for the management of such data. However, such methods could be considered denormalization, as they often require the hierarchical model, which was abandoned mostly due to its inflexibility, to be reintroduced into the architecture of the system.&lt;br /&gt;It is almost never a good idea to store data like this:&lt;br /&gt;Table 3&lt;br /&gt;Person Favorite Color Foods Not Eaten 1 Foods Not Eaten 2 Foods Not Eaten 3&lt;br /&gt;This schema is not in the 1NF, and does not accurately represent the relationship as it exists in the real world. Even if the database designer believes that users will not need to store more than three foods not eaten, this system makes it difficult to add a fourth. For instance:&lt;br /&gt;Table 4&lt;br /&gt;Person Website AIM Yahoo! Screenname ICQ&lt;br /&gt;This schema is not in the 1NF since people can have more than one AIM screenname. Most websites choose to ignore this, however, and only allow a user to register one screenname with their account.&lt;br /&gt;[edit]&lt;br /&gt;Second normal form&lt;br /&gt;A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.&lt;br /&gt;Second normal form (2NF) describes full functional dependency on the primary key. It most commonly applies to tables that have composite primary keys, where two or more attributes comprise the primary key. It requires that there are no non-trivial functional dependencies of a non-key attribute on a part (subset) of a candidate key. A relation is said to be in the 2NF if and only if it is in the 1NF and every non-key attribute is irreducibly dependent on the primary key (i.e. not partially dependent on candidate key). Thus, if all keys are singleton keys, the relation is guaranteed to be in at least 2NF.&lt;br /&gt;Consider a table describing the source of machine parts, with the following attributes:&lt;br /&gt;Parts source&lt;br /&gt;Part's ID (primary key) Supplier's ID (primary key) Supplier's name Price Supplier's address&lt;br /&gt;65 2 Stylized Parts $59.99 VA&lt;br /&gt;73 2 Stylized Parts $20.00 VA&lt;br /&gt;65 1 ACME Industries $59.99 CA&lt;br /&gt;This table is in the first normal form, as all values in the table are atomic (although, in a production system, the currency sign would not be included). The part's ID and the supplier's ID form the composite primary key because the same part can be supplied by multiple suppliers.&lt;br /&gt;The relationship of the primary keys to price is correct: price is fully dependent on the primary key since different suppliers may charge a different price for the same part.&lt;br /&gt;However, the supplier's name and address are only dependent on the supplier's ID, and thus this table breaks 2NF. Note the redundancy, where the name "Stylized Parts" and address "VA" is recorded twice. What if they relocate or merge with another company? This attribute should be placed in a second table like:&lt;br /&gt;Suppliers&lt;br /&gt;ID Name Address&lt;br /&gt;1 ACME Industries CA&lt;br /&gt;2 Stylized Parts VA&lt;br /&gt;In order to find if a table is in 2NF, examine each non-key column of the table and ask whether or not it is fully dependent on every key in the composite key. If it isn't, it should be moved to its own table. Note that the next step, making sure that each non-key column is not dependent on any other non-key column, constitutes the third normal form.&lt;br /&gt;[edit]&lt;br /&gt;Third normal form&lt;br /&gt;See main article Third normal form&lt;br /&gt;Third normal form (3NF) requires that the table be in 2NF, and that there be no non-trivial functional dependencies of non-key attributes on something other than a superset of a candidate key. A table is in 3NF if none of the non-primary key attributes is a fact about any other non-primary key attribute. In summary, all non-key attributes are mutually independent (i.e. there should not be transitive dependencies). Thus, any relation in which all the attributes are prime attributes (part of some key) is guaranteed to be in at least 3NF.&lt;br /&gt;Consider a table (in 2NF) that defines a machine part as having the following attributes.&lt;br /&gt;PART_NUMBER (PRIMARY KEY)&lt;br /&gt;MANUFACTURER_NAME&lt;br /&gt;MANUFACTURER_ADDRESS&lt;br /&gt;In this case, the manufacturer address does not belong on this table, because it is a fact about the manufacturer of the part, rather than the part itself. MANUFACTURER_ADDRESS should therefore be moved into a separate table with the attributes:&lt;br /&gt;MANUFACTURER_NAME (PRIMARY KEY)&lt;br /&gt;MANUFACTURER_ADDRESS&lt;br /&gt;...and the original table should be redefined as:&lt;br /&gt;PART_NUMBER (PRIMARY KEY)&lt;br /&gt;MANUFACTURER_NAME (FOREIGN KEY)&lt;br /&gt;The field MANUFACTURER_NAME in this table is a PRIMARY KEY in another table and is called FOREIGN KEY in this table&lt;br /&gt;The problem with a table not being in 3NF is that for every MANUFACTURER_NAME we have to maintain a redundant MANUFACTURER_ADDRESS (i.e. an address for each part_number, rather than one for each MANUFACTURER_NAME).&lt;br /&gt;[edit]&lt;br /&gt;Boyce-Codd normal form&lt;br /&gt;Boyce-Codd normal form (or BCNF) requires that there be no non-trivial functional dependencies of attributes on something other than a superset of a candidate key (called a superkey). At this stage, all attributes are dependent on a key, a whole key and nothing but a key (excluding trivial dependencies, like A-&gt;A). A table is said to be in the BCNF if and only if it is in the 3NF and every non-trivial, left-irreducible functional dependency has a candidate key as its determinant. In more informal terms, a table is in BCNF if it is in 3NF and the only determinants are the candidate keys.&lt;br /&gt;Still more memorable is the formulation: The key, the whole key, and nothing but the key - so help me Codd.&lt;br /&gt;Example of a relation that is in 3NF form but not in BCNF:&lt;br /&gt;Relation: {A,B,C,D} AB is a candidate key, BC is candidate key and A-&gt;C.&lt;br /&gt;Example of a relation that is in 3NF form and in BCNF:&lt;br /&gt;The relation R(A,B) is guaranteed to be in BCNF since its only possible functional dependencies are A-&gt;B, B-&gt;A and/or the trivial AB-&gt;AB.&lt;br /&gt;[edit]&lt;br /&gt;Fourth normal form&lt;br /&gt;Fourth normal form (or 4NF) requires that there be no non-trivial multi-valued dependencies of attribute sets on something other than a superset of a candidate key. A table is said to be in 4NF if and only if it is in the BCNF and multi-valued dependencies are functional dependencies. The 4NF removes unwanted data structures: multi-valued dependencies.&lt;br /&gt;Consider a case where we need the record of an employee with any professional qualifications they have gained, and internal training courses they have been on (an employee may have none, one or multiple of each of these). One way to record this information would be to create a relation as follows:&lt;br /&gt;EMPLOYEE_ID&lt;br /&gt;QUALIFICATION_ID&lt;br /&gt;TRAINING_COURSE_ID&lt;br /&gt;The problem with this design is that we might have to enter employee's qualification id more than once (or leave the qualification field blank) if they have been on more than one training course, which causes ambiguity on data storage and retrieval. Therefore this table is not in 4NF.&lt;br /&gt;There are actually two distinct many-to-many relationships here: one between Employee and Qualification ID, and one between Employee and Training Course ID. So two separate tables should be created to capture these.&lt;br /&gt;employee_qualification table:&lt;br /&gt;EMPLOYEE_ID&lt;br /&gt;QUALIFICATION_ID&lt;br /&gt;employee_training_course table:&lt;br /&gt;EMPLOYEE_ID&lt;br /&gt;TRAINING_COURSE_ID&lt;br /&gt;This example has assumed that the two fields being recorded for the employees are independent; contrast a different case where for example the information to be recorded is the academic qualifications possessed by each employee, and the academic institution where the qualification was achieved. In this case the two values are not independent - it is necessary to record both the qualification and the institution (as a pair of values) in each case, and so a relation such as the following would be correct:&lt;br /&gt;EMPLOYEE_ID&lt;br /&gt;DEGREE_ID&lt;br /&gt;UNIVERSITY_ID&lt;br /&gt;And this would require no changes to fit the fourth normal form requirements.&lt;br /&gt;Ronald Fagin demonstrated that it is always possible to achieve 4NF (but not always desirable). Rissanen's theorem is also applicable on multi-valued dependencies.&lt;br /&gt;[edit]&lt;br /&gt;Fifth normal form&lt;br /&gt;Fifth normal form (5NF and also PJ/NF) requires that there are no non-trivial join dependencies that do not follow from the key constraints. A table is said to be in the 5NF if and only if it is in 4NF and every join dependency in it is implied by the candidate keys.&lt;br /&gt;[edit]&lt;br /&gt;Fifth Normal form Example&lt;br /&gt;(Adapted from "A Simple Guide to Five Normal Forms in Relational Database Theory"; see Further Reading)&lt;br /&gt;Consider the following example:&lt;br /&gt;Unnormalized table&lt;br /&gt;Musician Instrument Genre&lt;br /&gt;James Piano Classical&lt;br /&gt;James Trumpet Classical&lt;br /&gt;Kate Drums Jazz&lt;br /&gt;Kate Piano Jazz&lt;br /&gt;Kate Trumpet Jazz&lt;br /&gt;Kate Clarinet Jazz&lt;br /&gt;Lois Saxophone Jazz&lt;br /&gt;Lois Piano Classical&lt;br /&gt;Lois Violin Classical&lt;br /&gt;Lois Guitar Rock&lt;br /&gt;Here we have a list of musicians and the instruments they play under a certain genre. We can take as a model that a musician plays a certain kind of music in a certain genre only if the following three conditions hold:&lt;br /&gt;• The musician plays the instrument.&lt;br /&gt;• The musician plays the genre.&lt;br /&gt;• The instrument is part of that genre.&lt;br /&gt;With these constraints it is possible to split the relation into three parts.&lt;br /&gt;&lt;br /&gt;Musician to Instrument&lt;br /&gt;Musician Instrument&lt;br /&gt;James Piano&lt;br /&gt;James Trumpet&lt;br /&gt;Kate Drums&lt;br /&gt;Kate Piano&lt;br /&gt;Kate Trumpet&lt;br /&gt;Kate Clarinet&lt;br /&gt;Lois Saxophone&lt;br /&gt;Lois Piano&lt;br /&gt;Lois Violin&lt;br /&gt;Lois Guitar&lt;br /&gt;Musician to Genre&lt;br /&gt;Musician Genre&lt;br /&gt;James Classical&lt;br /&gt;Kate Jazz&lt;br /&gt;Lois Jazz&lt;br /&gt;Lois Classical&lt;br /&gt;Lois Rock&lt;br /&gt;Instrument to Genre&lt;br /&gt;Instrument Genre&lt;br /&gt;Piano Classical&lt;br /&gt;Trumpet Classical&lt;br /&gt;Drums Jazz&lt;br /&gt;Piano Jazz&lt;br /&gt;Trumpet Jazz&lt;br /&gt;Clarinet Jazz&lt;br /&gt;Saxophone Jazz&lt;br /&gt;Violin Classical&lt;br /&gt;Guitar Rock&lt;br /&gt;&lt;br /&gt;Joining these three tables together will return the original relation.&lt;br /&gt;Note how this setup helps to remove redundancy. Suppose that Kate learns Jazz. In the previous setup we would have to add four new entries since each of the four instruments that Kate plays (Drums, Piano, Trumpet, and Clarinet) are all jazz instruments, while with the new setup we only need to make one addition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5072326839914180829-78550743649889963?l=webdevsolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webdevsolutions.blogspot.com/feeds/78550743649889963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5072326839914180829&amp;postID=78550743649889963&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/78550743649889963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/78550743649889963'/><link rel='alternate' type='text/html' href='http://webdevsolutions.blogspot.com/2008/07/know-more-about-sql-server.html' title='Know More About Sql Server'/><author><name>Dinesh Singh</name><uri>http://www.blogger.com/profile/08880477320643579956</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5072326839914180829.post-5076701798927796347</id><published>2008-07-28T11:12:00.000-07:00</published><updated>2008-07-28T11:16:44.734-07:00</updated><title type='text'>ACID</title><content type='html'>In databases, ACID stands for Atomicity, Consistency, Isolation, and Durability. They are considered to be the key transaction processing features/properties of a database management system, or DBMS. Without them, the integrity of the database cannot be guaranteed. In practice, these properties are often relaxed somewhat to provide better performance.&lt;br /&gt;In the context of databases, a single logical operation on the data is called a transaction. An example of a transaction is a transfer of funds from one account to another, even though it might consist of multiple individual operations (such as debiting one account and crediting another). The ACID properties guarantee that such transactions are processed reliably.&lt;br /&gt;• Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. The transfer of funds can be completed or it can fail for a multitude of reasons, but atomicity guarantees that one account won't be debited if the other is not credited as well. &lt;br /&gt;• Consistency refers to the database being in a legal state when the transaction begins and when it ends. This means that a transaction can't break the rules, or integrity constraints, of the database. If an integrity constraint states that all accounts must have a positive balance, then any transaction violating this rule will be aborted. &lt;br /&gt;• Isolation refers to the ability of the application to make operations in a transaction appear isolated from all other operations. This means that no operation outside the transaction can ever see the data in an intermediate state; a bank manager can see the transferred funds on one account or the other, but never on both—even if (s)he ran her query while the transfer was still being processed. More formally, isolation means the transaction history (or schedule) is serializable. For performance reasons, this ability is the most often relaxed constraint. See the isolation article for more details. &lt;br /&gt;• Durability refers to the guarantee that once the user has been notified of success, the transaction will persist, and not be undone. This means it will survive system failure, and that the database system has checked the integrity constraints and won't need to abort the transaction. Typically, all transactions are written into a log that can be played back to recreate the system to its state right before the failure. A transaction can only be deemed committed after it is safely in the log.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5072326839914180829-5076701798927796347?l=webdevsolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webdevsolutions.blogspot.com/feeds/5076701798927796347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5072326839914180829&amp;postID=5076701798927796347&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/5076701798927796347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/5076701798927796347'/><link rel='alternate' type='text/html' href='http://webdevsolutions.blogspot.com/2008/07/acid.html' title='ACID'/><author><name>Dinesh Singh</name><uri>http://www.blogger.com/profile/08880477320643579956</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5072326839914180829.post-5047455544520860452</id><published>2008-07-24T22:44:00.000-07:00</published><updated>2008-07-25T03:34:29.979-07:00</updated><title type='text'>GridView Edit and Update</title><content type='html'>  &lt;textarea id="txt" style="width: 406px; height: 625px"&gt;&lt;br /&gt;                 Gridview.aspx &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;asp:GridView ID=GridView1 runat="server" AutoGenerateColumns="False" DataKeyNames="proposal_id"&lt;br /&gt;OnRowEditing="dg_RowEditing" OnRowUpdating="dg_RowUpdating" OnRowCancelingEdit="dg_RowCancelingEdit" &lt;br /&gt;CssClass=border CellPadding=7 AlternatingRowStyle-CssClass=bg_lightgray Width=100% &gt;&lt;br /&gt;&lt;HeaderStyle CssClass="bg_darkgray1" HorizontalAlign=Center ForeColor=White /&gt;&lt;br /&gt;&lt;RowStyle HorizontalAlign=Center CssClass=bg_lightred /&gt;&lt;br /&gt;&lt;FooterStyle CssClass="bg_darkgray1" HorizontalAlign=Center ForeColor=red /&gt;&lt;br /&gt;&lt;Columns&gt;&lt;br /&gt;&lt;asp:TemplateField HeaderText="Proposal Id" ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="dollar"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("proposal_no")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("proposal_no")%&gt;&lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt; &lt;br /&gt;&lt;asp:TemplateField HeaderText="Version" ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="dollar"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("version")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("version")%&gt;&lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt; &lt;br /&gt;&lt;asp:TemplateField HeaderText="Client" ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="dollar"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("client_name")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("client_name")%&gt;&lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt;&lt;br /&gt;&lt;asp:TemplateField HeaderText="Group" ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="dollar"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("group_name")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("group_name")%&gt;&lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt;&lt;br /&gt;&lt;asp:TemplateField HeaderStyle-Width="17%" HeaderText="Order Date (dd/MM/yyyy) " ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="dollar"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("order_date")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;asp:TextBox ID="txtorderdate" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem,"order_date") %&gt;' Visible="true" Width="100px"&gt;&lt;/asp:TextBox&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;asp:RegularExpressionValidator ControlToValidate="txtorderdate" ID="RegularExpressionValidator1" runat="server" ErrorMessage="Must Enter (dd/MM/yyyy) Format"&lt;br /&gt;ValidationExpression="^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$" &gt;&lt;/asp:RegularExpressionValidator&gt; &lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt;&lt;br /&gt;&lt;asp:TemplateField HeaderStyle-Width="17%" HeaderText="Close Date (dd/MM/yyyy) " ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="dollar"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("close_date")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;asp:TextBox ID="txtclosedate" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem,"close_date") %&gt;' Visible="true" Width="100px"&gt;&lt;/asp:TextBox&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;asp:RegularExpressionValidator ControlToValidate="txtclosedate" ID="RegularExpressionValidator111" runat="server" ErrorMessage="Must Enter (dd/MM/yyyy) Format"&lt;br /&gt;ValidationExpression="^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$" &gt;&lt;/asp:RegularExpressionValidator&gt; &lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt;&lt;br /&gt;&lt;asp:TemplateField HeaderText="Profarma Invoice Freight" ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="euro"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("profarma_invoice_freight")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;asp:TextBox ID="txtprofarma_invoice_freight" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem,"profarma_invoice_freight") %&gt;' Visible="true" Width="100px"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;&lt;asp:RegularExpressionValidator ControlToValidate="txtprofarma_invoice_freight" ID="RegularExpressionValidator3" runat="server" ErrorMessage="Please Enter valid number" ValidationExpression="[-+]?[0-9]*\.?[0-9]*."&gt;&lt;/asp:RegularExpressionValidator&gt;&lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt; &lt;br /&gt;&lt;asp:TemplateField HeaderText="Net Freight" ItemStyle-HorizontalAlign=Center ItemStyle-Font-Bold=true SortExpression="euro"&gt;&lt;br /&gt;&lt;ItemTemplate&gt;&lt;br /&gt;&lt;%#Eval("net_freight")%&gt;&lt;br /&gt;&lt;/ItemTemplate&gt;&lt;br /&gt;&lt;EditItemTemplate&gt;&lt;br /&gt;&lt;asp:TextBox ID="txtnet_freight" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem,"net_freight") %&gt;' Visible="true" Width="100px"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;&lt;asp:RegularExpressionValidator ControlToValidate="txtnet_freight" ID="RegularExpressionValidator4" runat="server" ErrorMessage="Please Enter valid number" ValidationExpression="[-+]?[0-9]*\.?[0-9]*."&gt;&lt;/asp:RegularExpressionValidator&gt;&lt;br /&gt;&lt;/EditItemTemplate&gt; &lt;br /&gt;&lt;/asp:TemplateField&gt; &lt;br /&gt;&lt;asp:CommandField ItemStyle-HorizontalAlign=Center HeaderText="Edit" ButtonType="Button" ShowEditButton="True" /&gt;&lt;br /&gt;&lt;/Columns&gt;&lt;br /&gt;&lt;RowStyle CssClass="tableItem" /&gt; &lt;br /&gt;&lt;AlternatingRowStyle CssClass="bg_lightgray" /&gt;&lt;br /&gt;&lt;/asp:GridView&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                 &lt;br /&gt;                 &lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Gridview.cs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;protected void dg_RowEditing(object sender, GridViewEditEventArgs e)&lt;br /&gt;{&lt;br /&gt;dg.EditIndex = e.NewEditIndex;&lt;br /&gt;show_grid();}&lt;br /&gt;protected void dg_RowUpdating(object sender, GridViewUpdateEventArgs e)&lt;br /&gt;{&lt;br /&gt;string id = dg.DataKeys[e.RowIndex].Value.ToString();&lt;br /&gt;string order_date = ((TextBox)(dg.Rows[e.RowIndex].FindControl("txtorderdate"))).Text;&lt;br /&gt;string close_date = ((TextBox)(dg.Rows[e.RowIndex].FindControl("txtclosedate"))).Text;&lt;br /&gt;string Profarma_invoice_Freight = ((TextBox)(dg.Rows[e.RowIndex].FindControl("txtprofarma_invoice_freight"))).Text;&lt;br /&gt;string net_freight = ((TextBox)(dg.Rows[e.RowIndex].FindControl("txtnet_freight"))).Text;&lt;br /&gt;string sql = "update tb_client_proposal set close_date='" + close_date + "',order_date='" + order_date + "',Profarma_invoice_Freight='" + Profarma_invoice_Freight + "',net_freight='" + net_freight + "' where proposal_id='" + id + "'";&lt;br /&gt;data.Executecommand(sql);&lt;br /&gt;dg.EditIndex = -1;&lt;br /&gt;show_grid();&lt;br /&gt;}&lt;br /&gt;protected void dg_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)&lt;br /&gt;{&lt;br /&gt;dg.EditIndex = -1;&lt;br /&gt;show_grid();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5072326839914180829-5047455544520860452?l=webdevsolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webdevsolutions.blogspot.com/feeds/5047455544520860452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5072326839914180829&amp;postID=5047455544520860452&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/5047455544520860452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/5047455544520860452'/><link rel='alternate' type='text/html' href='http://webdevsolutions.blogspot.com/2008/07/gridview-edit-and-update.html' title='GridView Edit and Update'/><author><name>Dinesh Singh</name><uri>http://www.blogger.com/profile/08880477320643579956</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5072326839914180829.post-6606118976411695899</id><published>2008-07-24T00:08:00.000-07:00</published><updated>2008-07-24T00:10:20.818-07:00</updated><title type='text'>The Architecture of the .NET</title><content type='html'>&lt;p&gt;&lt;strong&gt;Framework Development Platform&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;The Microsoft .NET Framework introduces many new concepts, technologies, and terms. My goal in this chapter is to give you an overview of how the .NET Framework is architected, introduce you to some of the new technologies the framework includes, and define many of the terms you’ll be seeing when you start using it. I’ll also take you through the process of building your source code into an application or a set of redistributable components (types) and then explain how these components execute.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5072326839914180829-6606118976411695899?l=webdevsolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webdevsolutions.blogspot.com/feeds/6606118976411695899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5072326839914180829&amp;postID=6606118976411695899&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/6606118976411695899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5072326839914180829/posts/default/6606118976411695899'/><link rel='alternate' type='text/html' href='http://webdevsolutions.blogspot.com/2008/07/architecture-of-net.html' title='The Architecture of the .NET'/><author><name>Dinesh Singh</name><uri>http://www.blogger.com/profile/08880477320643579956</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
