我正在尝试制作一个程序,该程序获取未知的sql文件(从按钮上载),它将获取所有信息,但是我无法从连接字符串中获取任何信息,因为所有连接字符串都可以宁可冻结我的程序或给我一个错误。
private void SQLFileUploadButton_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "SQL Files|*.sql";
ofd.Title = "Select SQL database file";
if (ofd.ShowDialog() == DialogResult.OK)
{
SQLFileLocationLabel.Text = ofd.FileName;
SQLTablesComboBox.Enabled = true;
//In here i tried to get the sql file info but no avail
}
}