private void ImportSqlBtn_Click(object sender, EventArgs e) { OpenFileDialog Dialog = new OpenFileDialog(); Dialog.Filter = "Sql File (*.sql)|*.sql|All Files|*.*"; if (Dialog.ShowDialog() == DialogResult.OK) { string SqlFile = Dialog.FileName; } }