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
7 2662
Hi,
Do you have Comma "," as Decimal Seperator...?
Regards
Veena
Hi Veena.
Yes, I forgot to state. I have comma as decimal separator.
Marko
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
Great, thanks, will try that and let you know if it works.
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
Hi,
As you say CDec works Fine, Let me know how you are updating the dataset from textbox..?
post your code here..
Regards
Veena
I still havent solved the problem, so if anyone knows, help would be very appreciated.
Thanks!
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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)
{...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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...
|
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...
|
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...
|
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,...
| |