Check for Database Constraints
Problem
Adding constraints such as check constraints or foreign keys to a table are best practices to keep your data as clean as possible with minimal data enforcement rules performed at the database level. Unfortunately sometimes issues may occur where the data becomes out of synch and one of these constraints has been violated. This may be due to disabled constraints or constraints that are later added with the NOCHECK option. Finding these issues can be done by running queries to check each of the constraints, but is there any easier way to determine if the data the constraints support has been violated?
Solution
As mentioned already, one approach would be to write queries for each of the constraints and check the data to see if the constraints are being enforced. This is probably not all that difficult, but it could be time consuming. Another approach to tackle this issue is to use the DBCC CHECKCONSTRAINTS command. This command allows you to check the constraints to ensure that no data is violating the constraints that have been setup.
This command can be run as follows:
DBCC CHECKCONSTRAINTS (TableName) - checks an individual table
DBCC CHECKCONSTRAINTS (ConstraintName) - checks an individual constraint
DBCC CHECKCONSTRAINTS WITH ALL_CONSTRAINTS - checks all constraints in the database
DBCC CHECKCONSTRAINTS WITH ALL_ERRORMSGS - returns all rows that violate constraints
DBCC CHECKCONSTRAINTS WITH NO_INFOMSGS - suppress messages when query runs
SQL Server, Empty your Database & Reset Identity Columns **made Simple
This is a SQL Script that Cleans your Database Records & resets Identity Columns, and it is all in 6 lines!
/*Disable Constraints & Triggers*/
exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
exec sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL'
/*Perform delete operation on all table for cleanup*/
exec sp_MSforeachtable 'DELETE ?'
/*Enable Constraints & Triggers again*/
exec sp_MSforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
exec sp_MSforeachtable 'ALTER TABLE ? ENABLE TRIGGER ALL'
/*Reset Identity on tables with identity column*/
exec sp_MSforeachtable 'IF OBJECTPROPERTY(OBJECT_ID(''?''), ''TableHasIdentity'') = 1 BEGIN DBCC CHECKIDENT (''?'',RESEED,0) END'
If you dont want to miss any saved Diagrams… Continue reading
MySQL Import Data From EXCEL (csv file)

1. Save as excel document in CSV format. (found as CSV Comma Delimited file)
2. Connect to Mysql through command line
Start Cmd
cd c:\mysql\bin\ (or wherever the mysql directory is installed…)
3. Connect to MySQL command console
use
mysql -u root
to connect as root user to be able to do changes to your db
4. Remember to Save the CSV File in the mysql\bin directory
5. Enter the following commands
SELECT THE DATABASE TO USE
use yourdbname;
ENTER THE INSERT COMMAND
LOAD DATA LOCAL INFILE '/yourCSVfilename.csv'
INTO TABLE test_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(field1, filed2, field3);
For Greek or non-unicode Remember 3 Things
1. mysql> set character_set_database =utf8;
2. CSV File saved as UTF8 encoding
3. database Table character set to greek_unicode_ci;
SQL Script for Constrains
This is a SQL Script that returns a list of all constrains in a database..
SELECT f.name AS ForeignKey,
OBJECT_NAME(f.parent_object_id) AS TableName,
COL_NAME(fc.parent_object_id, fc.parent_column_id) AS ColumnName,
OBJECT_NAME (f.referenced_object_id) AS ReferenceTableName,
COL_NAME(fc.referenced_object_id, fc.referenced_column_id) AS ReferenceColumnName
FROM sys.foreign_keys AS f
INNER JOIN sys.foreign_key_columns AS fc
ON f.OBJECT_ID = fc.constraint_object_id
55 Sources for Web Design Inspiration
Here is the list ….
- The Best Designs
- Six Shooter Media’s Free Templates
- 2Advanced Studios
- Andreas Viklund Free Website Templates
- Studio7Designs
- Style Grind
- Open Source Web Design
- The Web Design Inspiration Photoset
- Most Inspired
- Open Source Templates
- Templates Box
- Smashing Magazine
- CSS Beauty
- CSS Galleries
- Drupal Sites
- Open Source Web Templates
- CSS Remix
- Glenn Wolsey 10 Most Beautiful Blog Designs
- CSS Drive
- Perfection
- CSS Elite
- SyleGala
- Creative Pakistan
- The FWA
- CSS Hazard
- Beautifully Webdesign
- Unmatched Style
- CSS Import
- Light on Dark
- StyleBoost
- CSS Bloom
- Screen Fluent
- CSS Websites
- Website Design Awards
- 3point7designs
- CSS Galaxy
- Screenalicio.us
- The Dreamer
- Style Crunch
- CSS Flavor
- Inspiration King
- CSS Thesis
- Web Creme
- CSS Zen Garden
- CSS Reboot
- WebDigity
- The Pixel Creativity
- Top Wordpess Themes
- CSSClip
- Deviant Art
- 83 Beautiful Wordpress Themes (smashing magazine)
- Go Drupal
- One Pixel Army
- CSS Mania
- Design Shack
Simple Xml AS3 Navigation Menu-V2
This is a the new version of Flash ActionScript3 Navigation menu. It’s an xml driven
Features:
- you can use it anywhere you want, all classes are open-source (caurina tweener included)
- easy implementation of links and sub-links, fully xml driven
- handles ok on non or relative links
Bugs Fixed:
- MouseHand is now updated when hovering on a link ()
- CallArg Class is now included ok, sorry for that i had this in my default class location


Download the sample files from this link.
The .fla file is included. Any comments on the code is appreciated. Feel free to use!!
Top 12 Windows 7 Hacks

If you are looking for Windows 7 hacks, I am sure you can finds loads of them on web. What matters is, how many of them are really important. Do you think unlocking the Taskbar in Windows 7 is something very exciting? Obviously, not for the majority of users its nothing cool. Instead if you are interested in Windows 7 Hack that can help you to get rid of expiry date, remove watermark, or disable send feedback link then my article can surely help you out. I organized a set Top 12 Windows 7 Hack You Must Know. This list includes some of the handy posts on Windows 7 hacks in our blog. I have also provided the sources where you can find the hacks.
Fix Chrome on Windows 7 RC / Beta

right click on your chrome icon then select properties. Under the shortcut tab you will see Target. The line ends with chrome.exe so just add –in-process-plugins after that. So the line should look something like this:
C:\Users\user\AppData\Local\Google\Chrome\Application\chrome.exe --in-process-plugins

