# Re: 请教如何在 DataEnvironment 定文字型式之"参数"?

Posted by banana on November 09, 1999 at 10:29:02:

In Reply to: 请教如何在 DataEnvironment 定文字型式之"参数"? posted by LuLu on November 08, 1999 at 15:25:58:

: 请教如何在 DataEnvironment 定文字型式之"参数"?

: 1) Command1 之SQL陈述式 ---> Select * From 成绩单 Where 姓名 = ?
: 参数 Param1 设定依原先不变.

: 2) 程式码 如下
: a. DataEnvironment1.Command1 Text1.Text
: b. DataEnvironment1.Command1 " ' " & Text1.Text & " ' "
: c. DataEnvironment1.Command1 " & " ' " & Text1.Text & " ' "
: d. DataEnvironment1.Command1 " &" " ' " & Text1.Text & " ' "

: 均出现错误 "执行阶段错误'13': 型态不符"

use string variable, e.g.,

sql = "banana skin"
DataEnvironment1.Command1 sql

i met your problem before, i solved it in this way. but i don't know why. any body have suggestion?

Follow Ups: