Ahhh...I missed the "!"/not equals.

Definitely not a pain!  The more feedback, the better for the code and
user-base!

Roberto

On Tue, April 26, 2005 12:40, Maxime Levesque said:
>
>  Don't want to be a pain here, but the fix is to
> *not* set the Size property, which the latest version does :
>
> http://svn.apache.org/repos/asf/incubator/ibatis/trunk/cs/mapper/IBatisNet.D
> ataMapper/Commands/EmbedParamsPreparedCommand.cs
>
> on line 139 ...
>
> note that the code has moved to EmbedParamsPreparedCommand.cs ...
>
>
>> The latest source does do the setting of parameter size copy,
>
>
>
> -----Original Message-----
> From: Roberto Rabe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 26, 2005 11:02 AM
> To: ibatis-user-cs@incubator.apache.org
> Subject: Re: bug fix for oracle's odp.net driver
>
> The latest source does do the setting of parameter size copy, and the test
> suite does include the ODP.NET driver (there are 2 directories containing
> maps for testing both the MS provider and ODP).  :-)
>
> But yes, it may seem that more folks are using the MS driver based on the
> list traffic.
>
> Roberto
>
> On Tue, April 26, 2005 11:22, Maxime Levesque said:
>>
>>  It was indeed a bug (at least with my definition of bug...)
>>
>> To recapitulate (again) : insertion of strings (as varchar2) end up as
>> null
>> in the DB.
>>
>> The Microsoft driver is not affected by this, but for us it is not an
>> option
>> (we need the extra
>> features of the oracle driver).
>>
>> The fix involves a change in the class :
>>
>>   IBatisNet.DataMapper.MappedStatements.MappedStatement
>>
>> // FIX BEGIN (line 225)
>>
>>
> if(typeof(command).FullName.Equals("Oracle.DataAccess.Client.OracleCommand")
>> &&
>>          !sqlParameter.DbType.Equals(System.Data.DbType.String))
>>                                  ((IDbDataParameter)parameterCopy).Size
>> ((IDbDataParameter)sqlParameter).Size;
>> // END FIX
>>
>> A few non public fields of oracle's connection differ when
>> IDbDataParameter.Size is set
>>
>> - Not good (when Size set to 0) :
>>              m_maxSize       0       int
>>              m_modified      true    bool
>>              m_precision     0       byte
>>
>> - Good (when Size set never set) :
>>              m_maxSize       -1      int
>>              m_modified      false   bool
>>              m_precision     100     byte
>>
>>
>>  My conclusion is that no one else is using ibatis + oracle's odp.net
>> together, and your test suite probably doesn't include the combination,
>> Which leaves me a bit worried of using iBatis for our project.
>>
>>  On the other hand, I like the fact that ibatis leaves full control
>> of the sql/stored procs, but using an untested driver is risky
>> (this is a commercial project).
>>
>>  So, is this driver supported, or will it be in the very
>> Near future ? (i.e. will the odp.net driver be
>> Tested as part of the nunit test suite ) ?
>>
>
>
>

Reply via email to