diff --git a/LiteDB.Studio/Forms/ConnectionForm.cs b/LiteDB.Studio/Forms/ConnectionForm.cs index 2f9640d..900c090 100644 --- a/LiteDB.Studio/Forms/ConnectionForm.cs +++ b/LiteDB.Studio/Forms/ConnectionForm.cs @@ -51,6 +51,12 @@ public ConnectionForm(ConnectionString cs) private void BtnConnect_Click(object sender, EventArgs e) { + if (!AppSettingsManager.IsDbExist(txtFilename.Text)) + { + MessageBox.Show($"Field {groupBox2.Text} should contains valid path to database file, please check it out.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + this.ConnectionString.Connection = radModeDirect.Checked ? ConnectionType.Direct : radModeShared.Checked ? ConnectionType.Shared : ConnectionType.Direct;