473,734 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

writing decimals back to an access database

1 New Member
help, I am trying to update a field on my database and cant seem to get the right value stored


eg on reading the database field i get the values I need such as 31.24, 3.15 and 16.00 and I use these in the web application successfully but when I come to write these values back to the database I cant write the decimals.

when I write these values back using the code
RecordSet("pric e") = intprice

I get 16.00 and 3124.00 and 315.00

I have tried changing the field in access to currency, long integer and double to no affect.
Feb 17 '07 #1
1 1802
iam_clint
1,208 Recognized Expert Top Contributor
wrap whatever number your writing back in

cint(123.20)

I believe this is right maybe not if that don't work try

cfloat(123.20)
Feb 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1958
by: Brian Daoust | last post by:
Hello everyone, I have an Access database with a table that has a text field. The data in the text field looks like: 3456.45.4343 Not sure why this is a text field, but it is. Anyways, trying to export this table to a Excel file, but when I do
12
3766
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My question is about storing data in a database. Yes I understand that you can link to a database in your program and read and write to the database etc etc. Well, that's all find and dandy but what if the person you're writing the application for...
1
2115
by: Capn Stoobie | last post by:
I have a database that I regularly import data into from a text file. The text file is produced by payroll software, and it is always the same format. Most of the time my acImportDelim command works fine, but occasionally (less than 10%) it will not import decimals. For instance, a value of 7.6 in the text file is imported into my table as 7. This is driving me crazy as I can't understand why it does this intermittently. I've...
3
1588
by: Mario Pais | last post by:
I have a problem with the decimals in a report I created in Access Database. In a table I have two fields. One is the "price" the second one is "quantity". When I develop a report I would like to have another field which is a result of Price * Quantity with a 2 decimals on the result. Example: 914,539.00 * $50.21, the result must be $45,919,003.19, however the report will shows always a wrong result of $45,919,002.35. I already tried to change...
1
9246
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9186
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8190
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6742
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6035
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4816
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.