我数据库有个字段定义为MONEY类型
界面上有个EDIT字段。
请问怎么样才能把EDIT里面的值存到数据库里?
思路我有 可是不知道怎么把EDIT的内容传唤为 MONEY存如数据库  
请写出具体点,

解决方案 »

  1.   

    先给一个字段付值,如下:
    FieldByName('Price').AsCurrency:=StrToCurr(edtPrice.Text);post就可以了
      

  2.   

    老兄StrToCurr DELPHI中有吗?不会是VB里的吧?晕~~~~
      

  3.   

    StrToCurr functionConverts a string to a Currency value. UnitSysutilsCategoryfloating point conversion routinesfunction StrToCurr(const S: string): Currency;DescriptionCall StrToCurr to convert a string that represents a floating-point value to the corresponding Currency value. The source string, S, must consist of an optional sign (+ or -), a string of digits with an optional decimal point, and an optional 'E' or 'e' followed by a signed integer. Leading and trailing blanks are ignored. The DecimalSeparator global variable defines the character that is used as a decimal point. Thousand separators and currency symbols are not allowed in the string. If the string doesn't contain a valid value, StrToCurr raises an EConvertError exception.Delphi的帮助里就有,自己看看吧!飞杨兄。
      

  4.   

    StrToCurr 
    CurrToStr
    在Delphi里常用啊,呵呵
      

  5.   

    table1.fieldbyname('price').asfloat:=strtofloat(trim(edit1.text));