Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/09/2010, 08:29
Joel251
 
Fecha de Ingreso: septiembre-2010
Mensajes: 10
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Error con store procedure en visual.net

Hola flaviovich gracias por tu respuesta, lo hice de la forma como dijistes y el codigo me quedo asi:

Código vb:
Ver original
  1. Public Function Prueba(ByVal nombre As String) As XmlDocument
  2.            
  3.             Dim conection As OdbcConnection = New OdbcConnection("dsn=IVR-Outbound;uid=******;pwd=********;")
  4.  
  5.             Dim DataAdapter As OdbcDataAdapter = New OdbcDataAdapter("SP_CONTACTOS_OUT", conection)
  6.             conection.Open()
  7.             DataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
  8.                        
  9.             DataAdapter.SelectCommand.Parameters.Add("@ID_CAMPANA", OdbcType.VarChar, 10)
  10.             DataAdapter.SelectCommand.Parameters("@ID_CAMPANA").Value = "1"
  11.             DataAdapter.SelectCommand.Parameters("@ID_CAMPANA").Direction = ParameterDirection.Input
  12.                
  13.             Dim myReader As OdbcDataReader = DataAdapter.SelectCommand.ExecuteReader()                        
  14.            
  15.            myReader.Read()            
  16.            
  17.             Dim Suscrip As String = myReader.Item(0)                        
  18.             conection.Close()                        
  19.             Return Xml
  20.             End Function

pero igual me sigue dando el mismo error

Última edición por Joel251; 15/09/2010 a las 08:39