Hi guys,
I’m
creating a custom action which tries to insert a row in the IniFile table.
When
executing this code, an exception occurs:
TableInfo info =
session.Database.Tables["IniFile"];
Record record
=
session.Database.CreateRecord(info.Columns.Count);
record.FormatString = info.Columns.FormatString;
record.SetString(1, "Initest");//IniFile
record.SetString(2, "test.ini");//FileName
record.SetString(3, "INSTALLLOCATION");//DirProperty
record.SetString(4, "section");//DirProperty
record.SetString(5, "keytest");//Key
record.SetString(6, "value");//Value
record.SetInteger(7, 0); //Action
record.SetString(8, "Component.exe");//Component_
try
{
session.Database.Execute(info.SqlInsertString, record);
}
catch (Exception ex)
{
session.Log(ex.Message);
throw;
}
1627 -
Function failed during execution Database:
Table(s) Update failed.
at Microsoft.Deployment.WindowsInstaller.View.Execute(Record
executeParams)
at
Microsoft.Deployment.WindowsInstaller.Database.Execute(String sql, Record
record)
at Custom.CustomActions.IniFileTest(Session
session)
The info.SqlInsertString
retuns “INSERT INTO `IniFile` (`IniFile`, `FileName`, `DirProperty`, `Section`,
`Key`, `Value`, `Action`, `Component_`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)”.
The format
string is: IniFile = [1], FileName = [2], DirProperty = [3], Section = [4], Key
= [5], Value = [6], Action = [7], Component_ = [8]
Am I doing
something wrong here?
Regards,
DvdBrink
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users