Visual Basic - AYUDA CON PARAMETROS

Life is soft - evento anual de software empresarial
 
Vista:

AYUDA CON PARAMETROS

Publicado por Angela (97 intervenciones) el 17/01/2003 19:18:35
HOLA
ALGUIEN ME PUEDE EXPLICAR ESTA FORMA DE DEFINIR PARAMETROS PARA UNA CONSULTA DE UN SP CON UNA CONEXION ADO, SEGUN LO QUE LEI ES MAS SEGURA ESTA FORMA DE DECLARAR PARAMETROS MI DUDA ES COMO ES LA SINTAXIS PARA SIMPLIFICAR SI TENGO QUE DECLARAR 3 PARAMETROS, Y SI TENGO QUE HACER 3
Set PARAMETRO = New ADODB.Parameter
Y 3
Dim PARAMETRO As ADODB.Parameter
ESTE ES EL CODIGO
PARAMETRO.Name = "cita"
PARAMETRO.Type = adVarChar
PARAMETRO.Direction = adParamInput
PARAMETRO.Size = 10
PARAMETRO.Value = iscita
cnm.Parameters.Append PARAMETRO
GRACIAS!!!!!!!!!!! POR LA AYUDA QUE ME PRESTEN
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

RE:AYUDA CON PARAMETROS

Publicado por Esteban (1144 intervenciones) el 17/01/2003 20:25:41
Yo nunca he utilizado esta forma porque he visto que se hacen más cosas de las necesarias, simplemente yo llamo un SP con parámetros de esta forma:

ADOCommand.CommandType = adCmdText
ADOCommand.CommandText = "Procedimiento " & var1 & ", " & var2
ADOCommand.Execute
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA CON PARAMETROS

Publicado por Angela (97 intervenciones) el 17/01/2003 21:06:48
Se ve muy bien eso,pero solo con ese codigo no es necesario poner de que tipo son los parametros?,no le entendi muy bien.
Gracias por tu ayuda!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar