Do normal inserts (without the transaction) work?

 SqlMapper m = Mapper.get();
 int id = (int)m.Insert("InsertUsager", u1);

You can use an inline parameter map to tell IBatisNet what type your
objects. Varchar2 referes to Orace.DataAccess.DbTypes.Varchar2 or
whatever the full DbTypes namespace is for your provider.

 <insert id="InsertUsager" parameterClass="Usager">
  Insert Into Usagers (id, nom_usager, nom, prenom)
  Values (UsagersSeq.nextVal, #NomUsager:Varchar2#, #Nom:Varchar2#,
#Prenom:Varchar2#)
 </insert>

Its usually not necessary to specify the type for basic things like
strings.

--- Maxime Levesque <[EMAIL PROTECTED]> wrote:
> 
>   Ok, using oracle's number(9) type solved the casting problem
> (number(10) or bigger causes a type cast exception, which is
> reasoneable)
> 
>  I still have the "strings become null",
> 
>  interestingly number(9) (c# int types), and Date (c# DateTime)
> get inserted correctly, so far, oracle varchar2 (c# strings)
> are problematic (they are saved as null in the DB)...

Reply via email to