Click to See Complete Forum and Search --> : C# .NET decimal point scale


dtm32236
01-13-2009, 12:11 PM
So, I have this following line of code in a .xsd file:

<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:

<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!

talldean
01-14-2009, 02:41 PM
When you say "doesn't work", what is actually doing?

dtm32236
01-21-2009, 09:38 AM
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.