|
Te adjunto ejemplo, espero que te sirva
(donde pone 192.168.3.1 va la IP de tu AS y los parametros siempre
alfanumericos).
Public ano
Public Cn400 As New
ADODB.Connection
Public Rs As New ADODB.Recordset Public Mandato As New ADODB.Command Public Parany As String * 4 Sub Prueba()
' Llamar a programa CL
ano = Year(Date) -
1
Parany = Trim(Str(ano)) Cn400.Open "provider=IBMDA400;data source=192.168.3.1;", "", "" Set Mandato.ActiveConnection = Cn400 Mandato.CommandText = "{{CALL /QSYS.LIB/PRUEBAS.LIB/CLPRUEBA.PGM(?)}}" Mandato.Prepared = True Mandato.Parameters.Append Mandato.CreateParameter("Parany", adChar, adParamInput, 4) Parms = Array(Parany) Mandato.Execute , Parms, adCmdText End Sub
Saludos cordiales,
Javier García / División I.T.
Lo·Trans, Logística y Transporte S.A. [EMAIL PROTECTED] · www.lo-trans.com Tel. +34 932 983 078 · Fax +34 932 983 034 Este mensaje es privado y confidencial. Según la legislación vigente, si Vd. no es el destinatario, no puede utilizarlo, difundirlo o copiarlo sin autorización. Si ha recibido este mensaje por error, comuníquelo por esta vía y destrúyalo. This
message is private and confidential. According to the law, if you are not the
intended recipient you are not allowed to use, distribute or copy it without
authorization. If you have received this message in error, notify us via email
and delete it.
|
Title: Mensaje
- RE: Llamar a CL desde VB6 con parámetros Javier García Marqués
- RE: Llamar a CL desde VB6 con parámetros Alvaro Mato
