■ 레코드셋을 구하는 방법을 보여준다.
▶ 예제 코드 (VB)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
Public Function GetRecordset(pConnection As ADODB.Connection, strSQL As String) As ADODB.Recordset Dim pRecordset As ADODB.Recordset Set GetRecordset = Nothing On Error GoTo ErrorLabel Set pRecordset = pConnection.Execute(strSQL) On Error GoTo 0 Set GetRecordset = pRecordset Exit Function ErrorLabel: End Function |