www.webdeveloper.com
Results 1 to 3 of 3

Thread: C# .NET decimal point scale

  1. #1
    Join Date
    Aug 2007
    Location
    New Jersey, US
    Posts
    1,779

    C# .NET decimal point scale

    So, I have this following line of code in a .xsd file:

    Code:
    <xs:element name="Price" msprop:Generator_UserColumnName="Price" msprop:Generator_ColumnVarNameInTable="columnPrice" msprop:Generator_ColumnPropNameInRow="Price" msprop:Generator_ColumnPropNameInTable="PriceColumn" type="xs:decimal" />
    and I want to limit this to two decimal points.

    So I tried this:

    Code:
    <xs:element name="Price" msprop:Generator_UserColumnName="Price" msprop:Generator_ColumnVarNameInTable="columnPrice" msprop:Generator_ColumnPropNameInRow="Price" msprop:Generator_ColumnPropNameInTable="PriceColumn">
      <xs:simpleType> 
         <xs:restriction base="xs:decimal"> 
           <xs:precision value="5"/> 
           <xs:scale value=2/> 
         </xs:restriction> 
       </xs:simpleType> 
    </xs:element>
    But this doesn't seem to work.

    Does anyone know why this is?
    (I'm just starting to learn this, so please excuse any stupid questions).

    Thanks a lot!

  2. #2
    Join Date
    Jan 2009
    Posts
    36
    When you say "doesn't work", what is actually doing?

  3. #3
    Join Date
    Aug 2007
    Location
    New Jersey, US
    Posts
    1,779
    Hey. I completely forgot about this thread. I'm still having the problem.... No matter where I place the new code I get compile errors (a ton of them). It shouldn't be a big deal though, I'm sure that we can set "Price" to 2 decimal places in the database instead of in this file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles