Created
September 25, 2019 06:52
-
-
Save doc-E-brown/0c4a7ca89905bd06f24a5c895829624a to your computer and use it in GitHub Desktop.
C# program to create ris database
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data.SqlClient; | |
namespace CreateRisDb | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
String computer_name = ""; // Fill this string with your computer name | |
SqlConnection myConn = new SqlConnection("Data Source=" + computer_name + "\\SQLEXPRESS;Integrated Security = true"); | |
myCommand = new SqlCommand("CREATE DATABASE ris", myConn); | |
myConn.Open(); | |
myCommand.ExecuteNonQuery(); | |
myConn.Close(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment