I have an insert statement that needs to insert NULL if a System.Int32
has a value of 0. According to the example on page 18 of DevGuide.pdf,
I should be able to use an inline parameter map to do this:

 #FooID:NUMERIC:0#

I recall using a similiar notation in the Java version of iBatis.
 
Example 18 in the same file (page 15) also suggests that NUMERIC is
valid. When I use NUMERIC, I get the following exception:

[ArgumentException: Requested value NUMERIC was not found.]
   System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
+906
  
IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFactory.CreateParametersForStatementText()
+352
  
IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFactory.Prepare()
+128
  
IBatisNet.DataMapper.Configuration.Sql.Static.StaticSql.BuildPreparedStatement(IDalSession
session, String sqlStatement) +105
  
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ApplyInlineParemeterMap(SqlMapper
sqlMap, IStatement statement, String sqlStatement) +498
  
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ProcessSqlStatement(XmlDocument
config, String sqlMapName, SqlMapper sqlMap, XmlNode commandTextNode,
IStatement statement) +170
  
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap(SqlMapper
sqlMap, XmlNode sqlMapNode) +2759
   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize()
+1114
   IBatisNet.DataMapper.SqlMapper.ConfigureAndWatch(String fileName,
ConfigureHandler configureDelegate) +180
   IBatisNet.DataMapper.Mapper.Instance() +99

Using this syntax seems to work:

 #FooID:int:0#

Reply via email to