■ 파라미터를 추가하는 방법을 보여준다.
▶ 예제 코드 (VB)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
Public Function AddParameter(pCommand As ADODB.Command, strParameterName As String, pDataType As DataTypeEnum, pParameterDirection As ParameterDirectionEnum, pSize As ADO_LONGPTR) As ADODB.Parameter Dim pParameter As ADODB.Parameter Set AddParameter = Nothing On Error GoTo ErrorLabel Set pParameter = pCommand.CreateParameter(strParameterName, pDataType, pParameterDirection, pSize) pCommand.Parameters.Append pParameter Set AddParameter = pParameter Exit Function ErrorLabel: End Function |