# Re: 请问错在那里 ?

Posted by Koi on June 10, 1998 at 01:53:02:

In Reply to: 请问错在那里 ? posted by 普罗米修斯 on June 09, 1998 at 10:48:01:

: 执行以下程式码 , 出 " 形态不符 " :

: Dim SQL As String
: Dim Rate As Single
:
: Dim db As Database
: Set db = OpenDatabase("C:\AA\AA.MDB")
:
: Rate = Form.Text3
:
: SQL = "UPDATE SQLTABLE SET Price = Price * " & " " + Rate + " " & " WHERE Currency = 'HK$'"
: db.Execute SQL

: 请问错在那里 ?

Rate 是 Single, 而 "+" 只能用在纯文字字串的相加, 不同型态的资料间
要当成字串相加, 要用 "&".

Follow Ups: