Thanks for your reply..
I am trying to use Type converter, but it seems like not working for me please guide me. here is what i am trying to do..
I have SQL Server 2008 and oracle 9i, LLBLGen 3.1..
SQL Field defined as decimal(10,2) which is converted .net type as system.decimal.
Oracle Field defined as Number(10,2) which is converted .net type as double.
I have mapped sql server fields first in LLBLGen designer and then manually mapping entities to oracle database.
I wanted to use type converted on oracle database to resolve this issue.When i am trying to add type converter from single/double , there is no converter in drop box to select, so please guide me how i can resolve this issue.
Rishi
daelmo wrote:
Rishi wrote:
I am using llblgen v3.1, SQL Server 2008 and Oracle 11g.
I have field which is defined decimal(10,2) in sql, Number (10,2) in oracle and .Net type for both should be decimal as per documentation.
http://msdn.microsoft.com/en-us/library/cc716729.aspx
http://msdn.microsoft.com/en-us/library/cc716726.aspx
Hi Rishi. It's not that simple. The scale/precision matters in oracle and the ado.net driver (either MS or ODP).
If you want a number from Oracle DB to be mapped onto a decimal you must increase the precision (>= 16). If modifying the DB schema is not an option, you can opt for writing a TypeConverter that converts from/to DB double to/from .net decimal. There is a lot of information about writing a TypeConverter in this forum, you can also download the source code package that contains a numeric/boolean typeConverter.
These are some related threads about how SqlServer/Oracle types are mapped:
http://llblgen.com/tinyforum/Messages.aspx?ThreadID=897
http://llblgen.com/tinyforum/Messages.aspx?ThreadID=3029
http://llblgen.com/tinyforum/Messages.aspx?ThreadID=15275