Results 1 to 5 of 5

Thread: [RESOLVED] currency

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    146

    Resolved [RESOLVED] currency

    i am using access database , i have 2 fields rate and quantity
    what is the best data type in which these must be stored
    i am having decimel values but if i use decimel as the dattype then it discards the digit after decimel

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: currency

    I would Use Double datatype for currencies
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: currency

    Quote Originally Posted by elixir_5000
    i am using access database , i have 2 fields rate and quantity
    what is the best data type in which these must be stored
    i am having decimel values but if i use decimel as the dattype then it discards the digit after decimel
    What is your code to store the data in your table?
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  4. #4
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: currency

    I will use Double for Rate and long for Quantity.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    146

    Re: currency

    VB Code:
    1. val = "insert into data values('" & Text5 & "','" & Text2 & "','" & Text4 & "','" & Text23 & "','" & Text22 & "','" & Text21 & "','" & Text6 & "','" & Text7 & "','" & Text8 & "','" & Combo1 & "','" & Text9 & "','" & Text17 & "','" & Text14 & "','" & Text18 & "','" & Text15 & "','" & DTP1 & "','" & DT2 & "','" & Text10 & "','" & Text11 & "','" & Text19 & "','" & Combo3 & "','" & DTP3 & "','" & rs2("cbmbox") & "','" & Text3 & "')"

    here text 14 contains rate
    in the data base the rate is stored perfectly if i use memo or text but it then gives prob in crystal treport when i convert it to word

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