这些代码行的含义

时间:2013-06-25 13:25:11

标签: vba

我正在将Visual Basic 6.0代码转换为.NET 4.5。我有以下几行代码。你能告诉我他们的意思吗?

SQLMappingTables = " SELECT * FROM MappingTables " & _
                    " WHERE  Group_Level = ? " & _
                    "    AND Group_Code  = ? " & _
                    "    AND Code = ? " 
Set Cmd_MappingTables = New ADODB.Command
Cmd_MappingTables.CommandText = SQLMappingTables
Cmd_MappingTables.CommandType = adCmdText
/// These are the line I do not understand
Set DefGroup_Level = Cmd_MappingTables.CreateParameter(, adChar, adParamInput, 1)
Set DefGroup_Code = Cmd_MappingTables.CreateParameter(, adChar, adParamInput, 15)
Set DefCode8 = Cmd_MappingTables.CreateParameter(, adChar, adParamInput, 3)

1 个答案:

答案 0 :(得分:1)

它定义了三个未命名(第一个参数省略)字符串(adChar)输入参数(adParamInput),长度为1,15和3。

您可以找到description here

我希望后续的行在执行命令之前为输入参数赋值。