private void button_CreaTabella_Click(object sender, EventArgs e) { adb.Connection("nuovodb.mdf"); adb.AddTable(new ADB_TableModel( name: "citta", record: new string[] { "id int", "nome varchar(50)", "abitanti int" }, primarykey: "id", primarykeyIdentity: true )); adb.AddTable(new ADB_TableModel( name: "studenti", record: new string[] { "id int", "nome varchar(30)", "cognome varchar(30)", "idcitta int" }, primarykey: "id", primarykeyIdentity: true, foreignkey: new string[, ] { { "idcitta", "citta(id)" } } )); MessageBox.Show("Tabella creata"); adb.AddTable("test", "id INT IDENTITY(1,1) NOT NULL PRIMARY KEY, prova VARCHAR(30)"); MessageBox.Show("Tabella test creata"); }
private void OttieniInformazioni_Load(object sender, EventArgs e) { adb.Connection("nuovodb.mdf"); }
private void VisteProcedure_Load(object sender, EventArgs e) { adb.Connection("nuovodb.mdf"); }
private void GestisciDati_Load(object sender, EventArgs e) { adb.Connection("nuovodb.mdf"); }
private void TestVari_Load(object sender, EventArgs e) { adb.Connection("Campionato.mdf"); }
private void ManipolaColonne_Load(object sender, EventArgs e) { adb.Connection("nuovodb.mdf"); }