Created
December 12, 2015 08:23
-
-
Save tedliou/e47cad4eac30770af09a to your computer and use it in GitHub Desktop.
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
//資料庫 | |
string cmdsql = "SQL指令"; | |
SqlConnection sql = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\資料庫名稱.mdf;Integrated Security=True;Connect Timeout=30"); | |
SqlCommand cmd = new SqlCommand(cmdsql, sql); | |
sql.Open(); | |
cmd.ExecuteNonQuery(); | |
sql.Close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment