If you have two separate tables with same primary key and want to check the updates in the other table,using BINARY_CHECKSUM would be the best answer. But need to careful about column data types. Column Data types shouldn't be text, ntext, image, XML, and cursor.
Here is T-SQL query to compare two rows from different table:
Take ORDERS1 as one table and ORDERS2 as other table
SELECT ORDERS1.PRIMARYKEY_ID
FROM
(SELECT PRIMARYKEY_ID, BINARY_CHECKSUM(*) AS CHECKVALUE FROM ORDERS1) AS CHECKSUMTABLE1
INNER JOIN
(SELECT PRIMARYKEY_ID, BINARY_CHECKSUM(*) AS CHECKVALUE FROM ORDERS2) AS CHECKSUMTABLE2
ON CHECKSUMTABLE1.PRIMARYKEY_ID= CHECKSUMTABLE2.PRIMARYKEY_ID
WHERE CHECKSUMTABLE1.CHECKVALUE <> CHECKSUMTABLE2.CHECKVALUE
....Dare 2 Dream - Success is not final, failure is not fatal: it is the courage to continue that counts.
"None can stop the rising sun, clouds can hide for a while........" -Ravi
Friday, February 20, 2009
Wednesday, February 18, 2009
Apply page themes programmatically
apply a page themes programmatically:
Need to set page's 'Theme' Property in Page's Preint event
protected void Page_PreInit(object sender, EventArgs e)
{
switch (Request.QueryString["theme"])
{
case "Orange":
Page.Theme = "OrangeTheme";
break;
case "skyblue":
Page.Theme = "skyblueTheme";
break;
}
}
apply a style sheet themes programmatically:
Override 'StyleSheetTheme" propert in page code. Following code override existing code and set current page theme as 'SkyblueTheme'
public override String StyleSheetTheme
{
get { return "SkyblueTheme"; }
}
Apply Contol SKINS programmatically:
We can over ride control skin properties in PreInt event
void Page_PreInit(object sender, EventArgs e)
{
Calendar1.SkinID = "CustomSkin";
}
Need to set page's 'Theme' Property in Page's Preint event
protected void Page_PreInit(object sender, EventArgs e)
{
switch (Request.QueryString["theme"])
{
case "Orange":
Page.Theme = "OrangeTheme";
break;
case "skyblue":
Page.Theme = "skyblueTheme";
break;
}
}
apply a style sheet themes programmatically:
Override 'StyleSheetTheme" propert in page code. Following code override existing code and set current page theme as 'SkyblueTheme'
public override String StyleSheetTheme
{
get { return "SkyblueTheme"; }
}
Apply Contol SKINS programmatically:
We can over ride control skin properties in PreInt event
void Page_PreInit(object sender, EventArgs e)
{
Calendar1.SkinID = "CustomSkin";
}
Sunday, February 8, 2009
Save not permitted in SQL Server 2008 Express Management Studio
I got the following message, When I was trying to change or add new columns for tables in SQL Server 2008 Express.
Message: " Save not Permitted. The changes you have made require the following tables need to dropped and re-created. you have either made changes to a table that can't be re-created or enabled the option preventing saving changes that require table to b re-created."
The only choice I had was to click to cancel, or to choose to save the message to a text file. Which won't useful to us. I found the answer for this bug in SQL Online. here it is..
Solution:
Go to Tools -> Options -> Designers -> Uncheck "Prevent saving changes that requires table re-creation"
I hope it works for you also...
Message: " Save not Permitted. The changes you have made require the following tables need to dropped and re-created. you have either made changes to a table that can't be re-created or enabled the option preventing saving changes that require table to b re-created."
The only choice I had was to click to cancel, or to choose to save the message to a text file. Which won't useful to us. I found the answer for this bug in SQL Online. here it is..
Solution:
Go to Tools -> Options -> Designers -> Uncheck "Prevent saving changes that requires table re-creation"
I hope it works for you also...
Subscribe to:
Posts (Atom)