473,396 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Decimal separator in Access database

Hello all!

Situation is as follows:
- Access database file, decimal field (18,2)
- Visual Basic 2005
- ADO connection

When I put Datagrid on the form, I see the value correctly, and I can change it.
But, when I try to put a textbox on another form, referencing to the same data, the data reads correctly (for example: 1,23), but when I change it (to for example: 4,56) and save it, it saves as (456) in the database.
Regional settings are set to Croatian in Windows, and Dataset locale is set to hr-HR.

Anybody has a clue what should I do?

Thanks a lot in advance!

Marko
Nov 26 '07 #1
7 2662
QVeen72
1,445 Expert 1GB
Hi,

Do you have Comma "," as Decimal Seperator...?

Regards
Veena
Nov 26 '07 #2
Hi Veena.

Yes, I forgot to state. I have comma as decimal separator.

Marko
Nov 26 '07 #3
QVeen72
1,445 Expert 1GB
Hi,

If your TextBox, is Bound To dataSource, then
You can Set the DataFormat, in PropertySheet >Databinding Advanced
set it to Numeric.
Or else, While Saving to Database, use
CDec(TextBox1.Text)
CDec Converts the Contents to Decimal Format..

Regards
Veena
Nov 26 '07 #4
Great, thanks, will try that and let you know if it works.
Nov 26 '07 #5
Hi again.

Ive set the property to Numeric and I got data type mismatch. Then Ive changed the data type from Decimal to Double in Dataset (.xsd file). Tryed again, and everything is like I never changed anything: I enter 1,23, and I get 123 in the database.
Ive checked the content of dataset.designer.vb file, and the data types are correct.

I've checked with CDec and I get 1,23 when I msgbox it. Ive also tryed with NumericUpDown control, and I also get 123 in the database. The other fields update normaly and correctly.

Are there any other things I could check? Any idea?

Marko
Nov 26 '07 #6
QVeen72
1,445 Expert 1GB
Hi,

As you say CDec works Fine, Let me know how you are updating the dataset from textbox..?
post your code here..

Regards
Veena
Nov 27 '07 #7
I still havent solved the problem, so if anyone knows, help would be very appreciated.
Thanks!
Dec 3 '07 #8

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

Similar topics

5
by: Ordz | last post by:
I want to write a program that will take a decimal with up to 4 places and convert it to 1/16 ths. I can sort of do that with: n = 375 * 16 / 1000 Print n; "/16" I am planning to use an input...
0
by: Mihajlo Canic | last post by:
I have a very strange problem. Im working with MS Access db and oledb objects (oledbadapter, oledbcommand, oledbconnection). Im using local cultureinfo with "," as decimal separator, which is also...
8
by: SAN CAZIANO | last post by:
i have to do in the onkeypress or in onchange the float (real) field validation I try something: function ValidaCampo(nomeCampo,TotInteri,TotDecimali) {...
0
by: Tobias | last post by:
Hi all, is it possible to set decimal-format in any way by using a variable or similar? Example: <xsl:variable name="myseparator" select="@separator"/> <xsl:decimal-format...
4
by: John Bowman | last post by:
Hi, A couple Q's , so I've come to the experts<g>. 1) I need a definitive answer to the following debate. I've got a couple developers who disagree on the following question. We've got an XML...
3
by: DustWolf | last post by:
Hello, I am wondering, what is the standard for including decimal numbers in XML code? What determines what is the decimal delimiter and what can be the grouping symbol? I have just realized...
8
by: =?Utf-8?B?T2xpdmllciBHSUw=?= | last post by:
Hello, I try to convert a volume stored as a string value in an XML file into a Decimal object. The volume is stored with comma as decimal separator ("210,12") according to french habits. To be...
2
by: pax | last post by:
Hello there! Here is my problem, in the simplest scenario: - an Access 2000 format database (created with Access 2003) - a simple table that contains one single field defined as Number, Decimal,...
3
by: =?Utf-8?B?UGFvbG8=?= | last post by:
I have a table column of SQL smallmoney type which I am updating via a form input field defined as decimal. If I enter, say, 51.09 via the decimal input field (representing $51.09), this is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...

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.