
LLamar un Stored Procedure de AS400 desde VB6
Publicado por Edwar (2 intervenciones) el 23/12/2014 16:48:30

Valora esta pregunta


0
'declaracione en algun modulo
Global TOINV As ADODB.Recordset
Global MiCom As ADODB.Command
'-------------------------------------------------
Set TOINV = New ADODB.Recordset
Set MiCom = New ADODB.Command
With MiCom
.ActiveConnection = MiSQL1
.CommandType = adCmdStoredProc
.CommandText = "Nombre del SP"
.Parameters.Append MiCom.CreateParameter("SFolioI", adVarChar, adParamInput, 10)
.Parameters("SFolioI").Value = Format(MiFolioInicial)
.Parameters.Append MiCom.CreateParameter("SFolioF", adVarChar, adParamInput, 10)
.Parameters("SFolioF").Value = Format(MiFolioFinal)
.CommandTimeout = 0
.Prepared = True
Set TOINV = .Execute
End With
Set MiCom = Nothing