ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject IBatisNet can't set SqlCommand's Connection property under Mono
Date Thu, 10 Aug 2006 04:13:33 GMT
I was experimenting with this Mono VMWare image:

 http://www.mono-project.com/news/archive/2006/Jul-28.html

by making a very very simple ConsoleApplication with one sql map
containing this statement:

 SELECT * FROM Product WHERE ProductId = #value#

I encountered this exception:

Unhandled Exception:
IBatisNet.Common.Exceptions.ConfigurationException:
- The error occured while Validate SqlMap.config.
- Check the parameter mapping typeHandler attribute '' (must by a
ITypeHandlerCallback implementation).
- The error occured in <sqlMap embedded="Resources.Product.xml,
ConsoleApplication2" xmlns="http://ibatis.apache.org/dataMapper" />.
- Check the Product.GetMany. --> System.InvalidCastException: The value
was not a valid SqlConnection.
 at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.set_Connection
(IDbConnection value) [0x00000]
 at IBatisNet.DataMapper.SqlMapSession.CreateCommand(CommandType
commandType) [0x00000]
 at
IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFactory.CreateParametersForTextCommand()
[0x00000]

The code works correctly on Microsoft.NET. 

Here's a link to Mono's SqlCommand.cs:

http://tinyurl.com/enb3a
http://svn.myrealbox.com/viewcvs/trunk/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs?rev=62561&view=log

Is this something we can fix or work around?

Mime
View raw message