Results 1 to 4 of 4

Thread: How to store comma values in DB

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    4

    Unhappy How to store comma values in DB

    --------------------------------------------------------------------------------

    Hi,

    I have a dataset filled with doubles(9,344 ; 0,543; ...)
    When I trie to write it to an access database; It only stores them like integers (9; 0;...) I did have set the property of the field in the database to double, but it stil doesn't work. And even when i set the amount of numbers behind the comma to 3 in the database he stores (9,000 ; 0,000;...)

    He obviously doesn't recognize the numbers behind the comma...

    Anyone who knows how to solve this?

  2. #2
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Re: How to store comma values in DB

    It doesn't recognize the numbers behind the comma, true. I had the sam problem a while ago. But you can solve it easily. Here is an example if the number is in the textbox:

    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         Dim change As String
    3.         change = TextBox1.Text.Replace(",", ".")
    4.         TextBox1.Text = change
    5.     End Sub

    Hope it helps!

    Nebo

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    4

    Unhappy Re: How to store comma values in DB

    I'm afraid it still doesn't work.
    I haven even tried to just place a fixed value 60.6 and it just doesn't matter =s

    He always places 61,00.... in the database..But I have tried everything in the access database... I have defined the field as double, currency,.. and have set the numbers behind the come big enough... but he always places zero's behind the comma...

    I'm 100% sure that it is possible to place double values in Access but I still don't manage to do it

  4. #4
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Re: How to store comma values in DB

    And I am 100% sure you can solve the problem with the code I posted

    Can you please attach the project or paste a code?

    Nebo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width