Created
November 3, 2012 05:47
-
-
Save m4tt1mus/4006210 to your computer and use it in GitHub Desktop.
Stack Usings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (SqlConnection conn = new SqlConnection(strConn)) | |
using (SqlCommand cmd = new SqlCommand(strQuery, conn)) | |
using (SqlCommand cmdReset = new SqlCommand("DBCC CHECKIDENT('Doctor', RESEED, 0)", conn)) | |
using (SqlCommand cmdUnCheck = new SqlCommand("alter table [dbo].[Doctor] nocheck constraint all",conn)) | |
using (SqlCommand cmdCheck = new SqlCommand("alter table [dbo].[Doctor] with check check constraint all",conn)) | |
{ | |
// do stuff | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment