The example is for the Java version (moreover, the numeric column type is not a type reconize by the Sql Server). You should only use type define in the Table 5 page 28 (Supported DbTypes for Parameter Maps and Result Maps (.NET only)) as you have discovered :-)
Cheers -Gilles ----- Original Message ----- From: "Ron Grabowski" <[EMAIL PROTECTED]> To: <ibatis-user-cs@incubator.apache.org> Sent: Monday, December 27, 2004 9:38 PM Subject: NUMERIC not valid type for Inline Parameter Maps (SQL Server 2000) > 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.Creat eParametersForStatementText() > +352 > > IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFactory.Prepa re() > +128 > > IBatisNet.DataMapper.Configuration.Sql.Static.StaticSql.BuildPreparedStateme nt(IDalSession > session, String sqlStatement) +105 > > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ApplyInlineParemeterMap( SqlMapper > sqlMap, IStatement statement, String sqlStatement) +498 > > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ProcessSqlStatement(XmlD ocument > config, String sqlMapName, SqlMapper sqlMap, XmlNode commandTextNode, > IStatement statement) +170 > > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap(SqlMappe r > 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#