Postback in simple terms is self referal of the page. In earlier version of ASP, the form would ‘POST’ values to another page for validation or some process using the post method.
But in ASP.NET, the page which accepts the values through its form would be responsible for validating/processing the values.
More @ http://www.codersource.net/asp_net_post_back.html
How to add and drop primary key in SQL Server
If you want to add primary key after you create the table in the sql server, then
1. go to Microsoft SQL Server Management Studio
2. Right click on the database and select new query
3. ALTER TABLE tbl_name ADD PRIMARY KEY(pr_key_column);
tbl_name – name of the table you want to assign primary key
pr_key_column – column/field name which you want it to be primary key
If the pr_key_column is allowed null values, then you can’t assign it as primary key. So if that is the case use this query first:
ALTER TABLE tbl_name ALTER COLUMN pr_key_column datatype not null;
To revoke primary key:
ALTER TABLE tbl_name DROP CONSTRAINT(pr_key_column);
Constraints in SQL Server
A good examples on constraints can be found here:
http://www.mssqlcity.com/Articles/General/using_constraints.htm
What is the difference between NCHAR, CHAR, NVARCHAR and VARCHAR
A good information with explanation is found here
http://www.sql-server-helper.com/faq/data-types-p01.aspx
Previous releases of Microsoft Visual Studio 2008 failed error
While you are trying to install MS SQL Server 2008 on the machine which already has Visual studio, you might come up with this problem.
Here is the remedy.
Go to command prompt and move to the MS SQL Server installation DVD like:
C:…>E: – assuming your DVD drive letter is ‘E’
Then provide the following command:
SETUP /action=install /skiprules=vsshellinstalledrule
While you are installing, you might come up with error message but pass it selecting ok.
The other solution might be the trivial one – uninstall VS and install MS SQL Server then install VS –
I hope it will help a lot.
How to move MySQL database from one server to another
First access the files of the database (MYI, MYD, FRM) from the existing database by going to
/var/lib/mysql/(your database) – This path holds true for ubuntu
Then go to the new server and put it in the same place
/var/lib/mysql/(your database).
restart your server and mysql then view it through phpmyadmin.
How to change default MySQL directory
Originally it will be located at /var/lib/mysql
Say you want to change it to /home/myApps/mysql
First if the mysql is running stop it: sudo /etc/init.d/mysql stop
and stop the server too: sudo/etc/init.d/apache2 stop
Go to /etc/mysql/my.cnf and edit:
datadir = /var/lib/mysql to datadir = /home/myApps/mysql
Copy files from existing path to the new path
cp -R /var/lib/mysql* /home/myApp/mysql
Grant ownership to new directory for mysql
sudo chown -R mysql:mysql /home/myApp/mysql
then start up your server and mysql – voila.