Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/09/2008, 10:01
wilferd
 
Fecha de Ingreso: mayo-2008
Mensajes: 19
Antigüedad: 16 años
Puntos: 0
Respuesta: Pasar datos de grid a bd sql

yo lo hago de esta forma:

dim con as string ="CADENA DE CONEXION"

Dim objconexion As New SqlConnection(con)

Dim objCommand As New SqlCommand("nombre del store procedure", objconexion )
objCommand.CommandType = CommandType.StoredProcedure

'Parametros de entrada'/// OPCIONAL, EN MI CASO NECESITABA UN PARAMETRO DE BUSQUEDA

Dim rif As New SqlParameter("@rif", SqlDbType.VarChar, 20)
rif.Direction = ParameterDirection.Input
objCommand.Parameters.Add(rif)
objCommand.Parameters("@rif").Value = agente

Dim objAdapter As New SqlDataAdapter
objAdapter.SelectCommand = objCommand
Dim objDS As New DataSet
objAdapter.Fill(objDS, "Pedidos")
GridView1.DataSource = objDS
GridView1.DataBind()


Esto es solo para mostrar en el gridview segun el codigo que tienes...

Última edición por wilferd; 10/09/2008 a las 10:11