Sometimes when you done changes in table columns and save, you will get the below error
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.
To resolve this issue simple do the below two setps.
To set specific rules on the data in a table column we will use SQL Constraints. When DML (Insert, Update, Delete) operation is performed on the table data, SQL server will check the constraints and it will not allow to perform the operation if the data not satisfies the constraints.
SQL server supports the following type of constraints.
1. NOT NULL : Column cannot store NULL value.
2. CHECK : Column data satisfies the specified condition.
3. UNIQUE : Column data contains different values (will not allow duplicate value).
4. PRIMARY KEY : Combination of UNIQUE and NOT NULL. Column cannot have NULL and duplicate value.
5. FOREIGN KEY : Allows data having reference with another table. Also allow NULL values.
6. DEFAULT : Insert a default value for the column when no data specified.
Below are the differences between Primary Key and Foreign Key.
Step1: In web.config file Write
the following code
statusCode="404" path="PageNotFound.aspx" responseMode="Redirect"
Step2: Settings need to be
updated in IIS7
2) Select your application
3) Open Error Pages under the IIS section -> clicks Open
clicking Open Features tab we will get below shown window. Now click Edit
Feature Settings tab
we will get below shown window,
the above window select radio button Custom Error Pages àok
<section name="httpErrors" overrideModeDefault="Deny" />
<section name="httpErrors" overrideModeDefault="Allow" />
Steps to Attach
& Detach Database.
Attach & Detach .mdf and .ldf files:
the steps mentioned below:
Note: Attach &Detach Operations can be done when the Database is
not in use.when it is in usage then it will not allow to proceed and the
following error message will appear
Restore of Database:
Step 1: Open Sql Server Management Studio and connect the database engine.
Step 2: Enter the To Database name.
Step 3:Select From Device and click on the browse button, then the following window will appear
Step 4:Click on Add Button , then the following window will appear
Step 5:. After selecting the backup file the following window appear.
Step 6: Click on OK Button in the above window then the following window will appear
Step 7: Select Restore button and Select Options tab from the above window, the following will appear.
Step 10: select Overwrite the existing database option and then click on OK button
Step 11: then you will find the below window says, Restore of database ‘Test’ completed successfully and then click on ok, then go to the database you will find all the tables, views, Stored procedures and etc.
Backup of Database:
1: Right on the Database for i.e Test - > All Tasks -> Backup
2: when clicked on Backup Database, the below will open, if you want Remove the
Existing path , and click on “Add” button
3: when clicked on add button, the below window will open, and click on the
4: After clicking the highlighted button, the below window will open, select
the location for saving the file and give the file name i.e. Test, click on ok
5: the below window open, and click on
Step 6: after clicking on OK button, the below window will open, then click on ok
7: after clicking on ok, the below window will open, saying that “back up
operation has been completed successfully”, you can find the file in the
Opening a database connection is a resource intensive and time consuming operation. Connection pooling increases the performance of Web applications by reusing active database connections instead of creating a new connection with every new request. Pool manager maintains a pool of open database connections. When a new connection requests come in, the pool manager checks if the pool contains any unused connections and returns one if available. If all the connections in the pool are busy and the maximum pool size has not been reached, the new connection is created and added to the pool. When the pool reaches its maximum size all new connection requests are being queued up until a connection in the pool becomes available or the connection attempt times out.
Connection pooling behavior is controlled by the connection string parameters. The following are four parameters that control most of the connection pooling behavior:
Connect Timeout - controls the wait period in seconds when a new connection is requested, if this timeout expires, an exception will be thrown. Default is 15 seconds.
Max Pool Size - specifies the maximum size of your connection pool. Default is 100. Most Web sites do not use more than 40 connections under the heaviest load but it depends on how long your database operations take to complete.
Min Pool Size - initial number of connections that will be added to the pool upon its creation. Default is zero; however, you may chose to set this to a small number such as 5 if your application needs consistent response times even after it was idle for hours. In this case the first user requests won't have to wait for those database connections to establish.
Pooling - controls if your connection pooling on or off. Default is true. Pooling=false.
Application Pool is one of the new and very good feature in IIS 6. Application pools are used in isolating Web applications from one another and thereby increasing the reliability of your ASP.NET Web applications. Application pools allow us to make the asp.net web applications robust.
An Application Pool contains one or more web applications and allows us to configure a level of isolation between different Web applications. If we want to isolate all the Web applications running in the same computer, we can do this by creating a separate application pool for each Web application and keep them in their corresponding application pool. Because each application pool runs in its own worker process, errors in one application pool will not affect the applications running in other application pools. Deploying applications in application pools is a primary advantage of running IIS 6.0 in worker process isolation mode because you can customize the application pools to achieve the degree of application isolation that you need.
A namespace is just a grouping of related classes. It's a method of putting classes inside a container so that they can be clearly distinguished from other classes with the same name. A namespace is a logical grouping rather than a physical grouping.
Design patterns are just convenient ways of reusing object-oriented code between projects and between programmers. The idea behind design patterns is simple write down and catalog common interactions between objects that programmers have frequently found useful.