A couple of things you can try Teddy, One, if you can use Dictionary<string,DateTime> instead of hashtable as your parameter, or in your inline map parameter do something like this: #date,dbType=Date,type=DateTime# (assuming your data column is a date column).
On Tue, Sep 22, 2009 at 8:44 AM, Teddy78 <teddy.fredaig...@sgcib.com> wrote: > > 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-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-cs-h...@ibatis.apache.org > > -- Michael J. McCurrey Read with me at http://www.mccurrey.com http://chaoticmindramblings.blogspot.com/