Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am trying to store decimal values in a SQL Server 2000 database, each decimal value can only have a max of two digits after the decimal point. In my database I have created my field, and set the precision to 7, and the scale to 2. This automatically adjusted the length of the field to 5.

 

I am using stored procedures to insert data into the database table, I have specified that I am passing a decimal datatype of size 5.

 

My problem is that if I insert the value 1.50, it automatically rounds it up to 2.0.

 

Any suggestions on how to stop the rounding occuring as it seems only to occur when I am passing the value into the database through the stored procedure.

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted

Problem solved, I ended up using a float data type.

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...