I wrote a config tool to easily configure msi installers I create with a Visual Studio Setup project. I successfully edited entries in the InstallExecuteSequence
table. Now I would like the change something in the Control
table as well but the select query returns 0 entries.
using (Database db = new Database(path, DatabaseOpenMode.Transact))
{
using (var vw = db.OpenView(db.Tables["Control"].SqlSelectString))
{
vw.Execute();
Record record = vw.Fetch(); // <= this always returns null
while (record != null)
{
record = vw.Fetch();
if (record == null)
break;
if (record["Dialog_"].ToString().ToLower().Contains("CustomCheckA") && record["Control"].ToString().ToLower().Contains("Text"))
{
tbName.Text = record["Text"].ToString();
}
if (record["Dialog_"].ToString().ToLower().Contains("CustomCheckA") && record["Control"].ToString().ToLower().Contains("BodyText"))
{
tbDescription.Text = record["Text"].ToString();
}
}
if (String.IsNullOrEmpty(eintrag.IDString))
MessageBox.Show("This file does not contain the searched keywords");
vw.Close();
}
db.Close();
}