Return-Path: Delivered-To: apmail-ibatis-user-cs-archive@www.apache.org Received: (qmail 41045 invoked from network); 23 Sep 2009 04:24:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Sep 2009 04:24:28 -0000 Received: (qmail 23447 invoked by uid 500); 23 Sep 2009 04:24:28 -0000 Delivered-To: apmail-ibatis-user-cs-archive@ibatis.apache.org Received: (qmail 23335 invoked by uid 500); 23 Sep 2009 04:24:27 -0000 Mailing-List: contact user-cs-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-cs@ibatis.apache.org Delivered-To: mailing list user-cs@ibatis.apache.org Received: (qmail 23327 invoked by uid 99); 23 Sep 2009 04:24:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2009 04:24:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mmccurrey@gmail.com designates 209.85.210.173 as permitted sender) Received: from [209.85.210.173] (HELO mail-yx0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2009 04:24:15 +0000 Received: by yxe3 with SMTP id 3so497255yxe.4 for ; Tue, 22 Sep 2009 21:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=zNvHnEQodvEmmv/8KNut/PnTshVFoTkfM+gLfgNjS/E=; b=Eru6Lf8OP6plyKLeLFHjIKuRKaOVh0Nf8ATHJCaeRPWEpfCgU7pc8dY2uExDy6xUW7 27NRsxvLS8wbeC41NO/McSn+Qa9TTnB7USpJjv5bw3Yf7OUuJfBm4pVPAMOTGC4fcJAg ymzjEGWQGykXeBJ1QanQe0TSj5ntYyu+lucOE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=kwjwDh4NddQDF6VtgYDCGaJoQUHKdY9g27n1cv9Ez3MboPMmNepE7ye4c/PUrZmxFX 0T7rn6xK4KquccYlzxwik/aHUkPYBJ0N9pb8HZpedj1CWOsBDGrF5DTKNr/9pAmHA09v 2XucGHB+OPg5n2HQnZLjnHcIsVqr41415QkHc= MIME-Version: 1.0 Received: by 10.150.100.17 with SMTP id x17mr3371105ybb.138.1253679834418; Tue, 22 Sep 2009 21:23:54 -0700 (PDT) Reply-To: michael@mccurrey.com In-Reply-To: <25530794.post@talk.nabble.com> References: <25530794.post@talk.nabble.com> Date: Tue, 22 Sep 2009 21:23:54 -0700 Message-ID: Subject: Re: Hastable and DateTime in DataMapper From: Michael McCurrey To: user-cs@ibatis.apache.org Content-Type: multipart/alternative; boundary=000e0cd2898e314d14047437156c X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd2898e314d14047437156c Content-Type: text/plain; charset=ISO-8859-1 A couple of things you can try Teddy, One, if you can use Dictionary 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 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 GetDeals(string id, DateTime date) > { > Hashtable map = new Hashtable(); > map.Add("id", id); > map.Add("date", date); !! Problem with this line > return ExecuteQueryForList("SelectDeals", map) as > List; > } > > -------- > > > > > -- > 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 > > -- Michael J. McCurrey Read with me at http://www.mccurrey.com http://chaoticmindramblings.blogspot.com/ --000e0cd2898e314d14047437156c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable A couple of things you can try Teddy,

One, if you can use Dictionary= <string,DateTime> instead of hashtable as your parameter, or
in yo= ur inline map parameter do something like this: #date,dbType=3DDate,type=3D= DateTime#=A0 (assuming your data column is a date column).

On Tue, Sep 22, 2009 at 8:44 AM, Teddy78 <teddy.fred= aigues@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 =A0:
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Input 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)
{
=A0 =A0 =A0 =A0Hashtable map =3D new Hashtable();
=A0 =A0 =A0 =A0map.Add("id", id);
=A0 =A0 =A0 =A0map.Add("date", date); !! Problem with this line<= br> =A0 =A0 =A0 =A0return ExecuteQueryForList<DataDeal>("SelectDeal= s", map) as List<DataDeal>;
}

--------

=A0<statements>
=A0 =A0<select id=3D"SelectDeals" resultMap=3D"DealResul= t" parameterClass=3D"map">
=A0 =A0 =A0select code
=A0 =A0 =A0from TDeal
=A0 =A0 =A0where RefreshDate=3D#date# and id=3D#id#
=A0 =A0</select>
=A0</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




--
Michael J. McCur= rey
Read with me at http://www.mccur= rey.com
http:/= /chaoticmindramblings.blogspot.com/
--000e0cd2898e314d14047437156c--