Subject Re: best type for storing 0.686956521739130434782?
Author angel_ignacio_colmenares
thanks Karol, I fixed it using 21 digits as you say.
now FirebirdDialect for Servicestack.OrmLite pass all unit tests.

btw, if someone is interested in using an ORM for Firebird can go to my respository (fork):
https://github.com/aicl/ServiceStack.OrmLite/
or to the official one:
https://github.com/ServiceStack.

OrmLite's definition
OrmLite is a set of light-weight C# extension methods around System.Data.* interfaces which is designed to persist POCO classes with a minimal amount of intrusion and configuration.


--- In firebird-support@yahoogroups.com, "karolbieniaszewski" <liviuslivius@...> wrote:
>
> Hi,
>
> maximum precision allowed is 18 digits
> you have here 0.6869 5652 1739 1304 3478 2 - 21 digits
> if you put 0.686956521739130434 this value all will be ok
> but i suppose you should use VarChar field for this if you do not need calculations
>
>
> Karol Bieniaszewski
>
> --- In firebird-support@yahoogroups.com, "angel_ignacio_colmenares" <angel_ignacio_colmenares@> wrote:
> >
> > hello,
> > I'm writing a firebird provider for ServiceStack.OrmLite and unit tests
> > ask for store the value : 0.686956521739130434782 in a table.
> > the datatable is simple:
> >
> > CREATE TABLE TEST
> > (
> > v1 float,
> > v2 float
> > );
> >
> > but when executing this statement:
> >
> > insert into Test (v1, v2)
> > values(
> > 0.686956,
> > 0.686956521739130434782
> > );
> >
> > throws this error:
> >
> > SQL Message : -104
> > Invalid token
> >
> > Engine Code : 335544569
> > Engine Message :
> > Dynamic SQL Error
> > SQL error code = -104
> > Token unknown - line 4, column 1
> > 0
> >
> >
> > what is wrong in this case?
> > must i use another data type ?
> >
>