Ok... bug squashed.  Contrary to what I originally thought, MSI does not use
the information provided in the _Validation table for row insert validation.
Instead, it uses it's own methods to verify that all required table columns
are supplied in the record.  To make a long story short, I updated how
custom tables are imported, so that it now properly supports nullable
columns.  The changes have been checked into CVS.

As a side note, when defining an idt, table definition file, the case of the
letter assigned to the type of the column is important.  Capitalized letters
allow the column to be nullable, while lowercase letters make the column
required.

Thanks for bringing this issue up.

Jim



Also, as a side note... try as I might, I was not able to merge my changes
in correctly.  The diff that I kept generating was for the entire file.  Any
insight on this would be appreciated.  I even got the latest, and edited the
file using notepad, but that still didn't work correctly.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim
Geurts
Sent: Wednesday, October 01, 2003 9:35 AM
To: 'David'; [EMAIL PROTECTED]
Subject: RE: [NAntC-Dev] MSITask - Nullable Columns in Tables

Right, I remember having run into this a long time ago.  It has to do when
you add a nullable column, but then do not specify information for that
column in the row data.  I'll take a look at the code again and get back to
you on this.

Jim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
David
Sent: Wednesday, October 01, 2003 6:36 AM
To: [EMAIL PROTECTED]
Subject: [NAntC-Dev] MSITask - Nullable Columns in Tables

Hi everybody,

First off all: whoever did that MSITask, that is just great!!! It is ene of
the most useful pieces of software for me in a long time.

But I have one question:

I am trying to include the ServiceInstall table with [1]. The problem is
that I can't get nullable columns to work. If I use [1] I get 

System.Runtime.InteropServices.COMException (0x80004005): Modify,Mode,Record
   at System.RuntimeType.ForwardCallToInvokeMember(String memberName,
BindingFlags flags, Object target, Int32[] WrapperTypes, MessageData&
msgData)
   at WindowsInstaller.View.Modify(MsiViewModify Mode, Record Record)
   at NAnt.Contrib.Tasks.MSITask.AddTableData(Database Database, Type
InstallerType, Object InstallerObject, String currentTable, MSITable table,
ArrayList columnList)

Now, I don't think it has anything to do with the row element. I tried
removing the row element altogether in order to create just an empty
ServiceInstall table. That worked, but when I look at the msi file in Orca,
all the columns are required. It seems that the nullable attribute of the
column element doesn't work. Am I doing something wrong? I did have a look
at the C# source code and it looked ok to me, but I am not familiar with the
Windows Installer API at all...

Thanks for any help!!

David

[1]
<tables>
  <table name="ServiceInstall">
    <columns>
      <column name="ServiceInstall" nullable="false" category="Identifier"
key="true"/>
      <column name="Name" nullable="false" category="Formatted"/>
      <column name="DisplayName" nullable="true" category="Formatted"/>
      <column name="ServiceType" nullable="false" category="DoubleInteger"/>
      <column name="StartType" nullable="false" category="DoubleInteger"/>
      <column name="ErrorControl" nullable="false"
category="DoubleInteger"/>
      <column name="LoadOrderGroup" nullable="true" category="Text"/>
      <column name="Dependencies" nullable="true" category="Formatted"/>
      <column name="StartName" nullable="true" category="Formatted"/>
      <column name="Password" nullable="true" category="Formatted"/>
      <column name="Arguments" nullable="true" category="Formatted"/>

      <column name="Component_" nullable="false" category="Identifier"/>
      <column name="Description" nullable="true" category="Formatted"/>
    </columns>
    <rows>
      <row>
        <columns>
          <column name="ServiceInstall" value="ConnectorService"/>
          <column name="Name" value="DezemConnectorService"/>
          <column name="DisplayName" value="dezem Connector"/>
          <column name="ServiceType" value="16"/>
          <column name="StartType" value="2"/>
          <column name="ErrorControl" value="1"/>
          <column name="LoadOrderGroup" value=""/>
          <column name="Dependencies" value=""/>
          <column name="StartName" value=""/>
          <column name="Password" value=""/>
          <column name="Arguments" value=""/>
          <column name="Component_" value="ConnectorExe"/>
          <column name="Description" value="Description"/>
        </columns>
      </row>
    </rows>
  </table>
</tables>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to