[Dbix-class] data precision question

Alan Humphrey alan.humphrey at comcast.net
Mon Dec 12 18:25:24 GMT 2011


This is a FreeTDS/ODBC driver issue.  Still looking into it but isql also returns the truncated value.

Thanks Martin, Peter!

-----Original Message-----
From: Peter Rabbitson [mailto:rabbit+dbic at rabbit.us] 
Sent: Monday, December 12, 2011 2:28 AM
To: DBIx::Class user and developer list
Subject: Re: [Dbix-class] data precision question

Martin J. Evans wrote:
> On 09/12/11 17:44, Alan Humphrey wrote:
>> Hi all –
>>
>> I’ve got a MSSQL database being accessed through ODBC. Several of the 
>> columns in the database use a datatype of ‘money’. When I query the 
>> database directly those fields come back with 4 digits of precision.
>>
>> My problem: by the time the data gets back to me via the resultset 
>> the column data has been rounded to 2 digits of precision.
>>
>> This problem persists whether or not I specify a data type in the 
>> Result definition.
>>
>> Any thoughts? Would changing the data type in the MSSQL column 
>> definition help?
>>

See what are the raw values that get into dbic $rs->cursor->next

If this is the correct non-rounded value - show your Result definition, and the code you use + DBIC_TRACE that results in rounded values.

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk




More information about the DBIx-Class mailing list