Hello

 Yes, of course

 Try 
<insert id="ins1" parameterClass="Class1">
insert into table1 (name) values (#Name#)
</insert>

Where #Name# should be property of the Class1.

Happy New Year

> -----Original Message-----
> From: Rahul Singh [mailto:[EMAIL PROTECTED] 
> Sent: Friday, December 31, 2004 12:31 AM
> To: ibatis-user-cs@incubator.apache.org
> Subject: Re: issues with datetime as model properties.
> 
> It seems that the inserts work using parameter maps...
> 
> Where is the actual insert for a new Order using 
> "InsertOrderViaParameterMap"?
> I don't see it anywhere in the tests.
> 
> Is there a way to insert it without creating an insert parameter map?
> 
> Rahul
> 
> <parameterMap id="insert-params">
>                       <parameter property="Id" dbType="Int"/> 
> <!-- Int for SqlClient,
> Obdc; Integer for Oledb -->
>                       <parameter property="Account.Id"/>
>                       <parameter property="Date" 
> nullValue="01/01/0001 00:00:00" />
>                       <parameter property="CardExpiry" />
>                       <parameter property="CardType" />       
>               
>                       <parameter property="CardNumber" />
>                       <parameter property="Street" />
>                       <parameter property="City" />                   
>                       <parameter property="Province" />
>                       <parameter property="PostalCode" />
>               </parameterMap>
> 
> 
> 
> 
> 
> 
> 
> On Thu, 30 Dec 2004 15:16:17 +0100, gilles bayon
> <[EMAIL PROTECTED]> wrote:
> > The type datetime is supported by iBATISNET, see Nunit test 
> for usage.
> >  
> > Example, class IBatisNet.Test\Domain\Order.cs,
> > IBatisNet.Test\Maps\MSSQL\SqlClient\order.xml
> >  
> > -Gilles
> > 
> > > On Wed, 29 Dec 2004 17:17:49 -0500, Rahul Singh wrote:
> > > >?"The statement has been terminated. Arithmetic overflow error
> > > >?converting expression to data type datetime. "
> > > >
> > > >?How do you guys deal with DateTime values as your object
> > > >?properties? I'm getting this error when I try to insert 
> the object.
> > > >
> > > >?Rahul
> > > 
> > > At the moment, I have the model object convert the value 
> back and forth
> > between a string representation and a binary 
> representation. The model
> > object has a separate property for the string 
> representation that do the
> > conversion and pass the binary to the actual Date property. 
> (So there is no
> > private string field, just the binary.) The data access 
> methods use the
> > binary property. The controls use the string property. The 
> string methods
> > also watch for the magic null strings, and return blanks to 
> the controls.
> > > 
> > > Next, I'm going to refactor for the Spring Framework, 
> which I believe has
> > a lot of conversion utilities built in. Spring is widely 
> used by the Java
> > community, and I expect we'll find the same on the .NET side soon. 
> > > 
> > > [http://www.springframework.net/]
> > > 
> > > -Ted.
> > > 
> > > 
> > 
> > 
> > Accédez au courrier électronique de La Poste : www.laposte.net ;
> > 3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)
> 


___________________________________________________________________________

This communication is confidential and may be legally privileged. 
If you believe you are not an intended recipient, please inform the sender, 
delete the e-mail and do not copy, print or use it or disclose it to others. 
You can inform the sender by replying to this e-mail or by telephone (+380 44 
4906080).


Reply via email to