ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teddy78 <teddy.fredaig...@sgcib.com>
Subject Hastable and DateTime in DataMapper
Date Tue, 22 Sep 2009 15:44:38 GMT

Hello,

I have a problem when I use Hashtable of DateTime in ParameterClass : 
If I use DateTime in the Hastable a get the error  : 
		Input string was not in a correct format.
If I do not use the parameter date in the Hashtable, all is correct.

Have you got any ideas?
Thanks

The source code :

public List<DataDeal> GetDeals(string id, DateTime date)
{
	Hashtable map = new Hashtable();
	map.Add("id", id);
	map.Add("date", date); !! Problem with this line
	return ExecuteQueryForList<DataDeal>("SelectDeals", map) as List<DataDeal>;
}

--------

  <statements>
    <select id="SelectDeals" resultMap="DealResult" parameterClass="map">
      select code
      from TDeal
      where RefreshDate=#date# and id=#id#
    </select>
  </statements>
-- 
View this message in context: http://www.nabble.com/Hastable-and-DateTime-in-DataMapper-tp25530794p25530794.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-cs-help@ibatis.apache.org


Mime
View raw message