Visual Basic - Retorno de parametros de un store procedure a un r

Life is soft - evento anual de software empresarial
 
Vista:

Retorno de parametros de un store procedure a un r

Publicado por Jose Luis Romero (4 intervenciones) el 25/07/2002 17:59:17
Hola !

Les agradezco de antemano.
Estoy trabajando con VB6 y SQL Server 7. mi problema es que hago referencia a un store, ese store retorna parametros y en VB no se como utilizar, asi como en VB cuando llamamos a una funcion con retorno de parametros.

Gracias nuevamente

Tengo esto pero me marca un error
Que es:
Número de error: 3704, Operation is not allowed when the object is closed.

Dim cmd As New ADODB.Command ' EN ESTA VARIABLE SE CREAN LOS COMANDOS
Dim rs As New ADODB.Recordset ' EN ESTA
Dim fldloop As ADODB.Field
Dim CVE_CLIE As ADODB.Parameter, FOLIO_T As ADODB.Parameter
Dim RFC As ADODB.Parameter, FAXCLIE As ADODB.Parameter
Dim CveOficina As ADODB.Parameter, NOMBREI As ADODB.Parameter, Mult_clie As ADODB.Parameter
Dim provStr As String
Dim i As Integer
On Error GoTo Error
Abrir_dbsqlADO 1

' Set up a command object for the stored procedure.
Set cmd.ActiveConnection = Base1
cmd.CommandText = "SIMCOM_Obt_folio" ' NOMBRE DEL PROCEDIMIENTO A EJECUTAR
cmd.CommandType = adCmdStoredProc

' Set up a return parameter.

' PARAMETRO DE ENTRADA CLAVE DEL CLIENTE
Set CVE_CLIE = cmd.CreateParameter("CVE_CLIE", adVarChar, adParamInput, 5, "MCOBD")
cmd.Parameters.Append CVE_CLIE
CVE_CLIE.Value = "MCOBD"
' PARAMETROS DE SALIDA VALOR QUE RETORNA EL STORE PROCEDURE
Set FOLIO_T = cmd.CreateParameter("OUTPUT", adVarChar, adParamOutput, 10)
cmd.Parameters.Append FOLIO_T

Set RFC = cmd.CreateParameter("OUTPUT", adVarChar, adParamOutput, 15)
cmd.Para
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder