Decimal properity value cannot post from .net to jade

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Decimal properity value cannot post from .net to jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:29 pm

by Didier >> Wed, 29 Jul 2009 1:46:34 GMT

hi:
We develope a system , customer can create an order on web.
My Web is .net(C#) and DB is Jade.

we define class Order which has the following properties:
.qty : Integer
.unitPrice : Decimal[12,2]

the following code fragement:
=================================================================================== process.BeginTransaction(JomTransactionType.Persistent);
Order order = new Order(ClassPersistence.Persistent);
...
order.SetQty( 1 );
order.SetUnitPrice( 100.00 );
...
process.CommitTransaction(JomTransactionType.Persistent);
===================================================================================

we found that in Jade for this order qty=1, but unitPrice=0;

By my testing, we can set Integer , String and reference properties value correctly,
but Decimal properties value can not be set.

What's wrong? How to walk around ?

Attached is Exposured Order class file.

Appreciate for any help.

Didier
2009.7.29
Attachments

[The extension cs has been deactivated and can no longer be displayed.]

Last edited by ConvertFromOldNGs on Fri Aug 07, 2009 4:36 pm, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Decimal properity value cannot post from .net to jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:29 pm

by Dean Cooper >> Fri, 31 Jul 2009 1:29:24 GMT

We can confirm that the behaviour is a bug with decimals which occurs when
running under Unicode. We have opened a PAR to address this.

Dean.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Decimal properity value cannot post from .net to jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:29 pm

by Dean Cooper >> Fri, 31 Jul 2009 9:59:31 GMT

The problem has been fixed in 6.3.5, due for release at the end of November.
As possible workaround until then is as follows.

As we understand it, you currently have a set method in JADE that takes a
decimal parameter which sets the property to that value.

A workaround would be to implement another set method which takes either a
Real or a String etc; and do the conversion from the parameter type to a
Decimal inside JADE. So something like:

setUnitPriceFromReal(real : Real) updating;begin

self.unitPrice := real.Decimal;
end;

You will then need to expose this new method to .NET and invoke it via your
...NET app passing the new type.

Dean.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Decimal properity value cannot post from .net to jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:29 pm

by Didier >> Sat, 1 Aug 2009 0:42:11 GMT

Thanks.

Didier
2009.8.1


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 16 guests