How to set the precision of the data saving into database

hello, I am using sql server 2000 and using asp to insert into table. And I want to save the data from flash to database, in which there is xscale and yscale of the movieclip. They can be 5 or 6 decimals. How should I write the code to save them with 2 decimals. I don’t know I should do this in asp code or do it in database ? Could anyone give some suggestion, thanks!!

you should do the code in FLash and then send the info to the ASP script.

If it were me, I’d do it within the ASP code before storing the values. The code below will do the trick. The “+ 0.5” takes care of the rounding up/down.

<%
xscale = Int(xscale * 100 + 0.5) / 100
yscale = Int(yscale * 100 + 0.5) / 100
%>

[edit] or you could use the equivalent math coding within the ActionScript. Hi Jubba :slight_smile: [/edit]

thanks, I try it now