ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Heaver" <G.Hea...@kainos.com>
Subject SqlGeography and UnknownTypeHandler
Date Thu, 15 Jan 2009 17:35:56 GMT
Hi all,

 

Trying to use iBATIS with SQL 2008 and have a class with a SqlGeography
type (Microsoft.SqlServer.Types.SqlGeography)

 

However when I try to insert I get the following

 

Error     1

failed: System.NullReferenceException : Object reference not set to an
instance of an object.

   at
IBatisNet.DataMapper.TypeHandlers.UnknownTypeHandler.SetParameter(IDataP
arameter dataParameter, Object parameterValue, String dbType)

   at
IBatisNet.DataMapper.Configuration.ParameterMapping.ParameterMap.SetPara
meter(ParameterProperty mapping, IDataParameter dataParameter, Object
parameterValue)

   at
IBatisNet.DataMapper.Commands.DefaultPreparedCommand.ApplyParameterMap(I
DalSession session, IDbCommand command, RequestScope request, IStatement
statement, Object parameterObject)

   at
IBatisNet.DataMapper.Commands.DefaultPreparedCommand.Create(RequestScope
request, IDalSession session, IStatement statement, Object
parameterObject)

   at
IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObj
ect(IDalSession session, Object parameterObject, Object resultObject)

   at
IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObj
ect(IDalSession session, Object parameterObject)

   at IBatisNet.DataMapper.SqlMapper.QueryForObject(String
statementName, Object parameterObject)

 

Is this because of the SqlGeography type? How can I get round this?

 

Thanks!

Garrett

 


--------------------------------------------------------------------
This e-mail is intended solely for the addressee and is strictly confidential; if you are
not the addressee please destroy the message and all copies. Any opinion or information contained
in this email or its attachments that does not relate to the business of Kainos 
is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading
name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370,
having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, 
Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland
for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs
but is not guaranteed to be virus free; further terms and conditions may be 
found on our website - www.kainos.com 



Mime
View raw message