hOLAS COMPAÑEROS DEL FORO
Esta es la situacion:
Tengo un frmVentas y en el diferentes labes y textbox , cuando le doy clic en el botn agregar y miro la tabla ventas ( tabla a la cual utilizo mediente la instruccin INSERT TO) no me aparecen los registros , pero cuando cierro la aplicacion
COMPLETAMENTE Y LO VUELVO ABRIR LOS DATOS SI APARCEN.
ESTE ES EL CODIGO
Private
Sub btnAgregar_Click(ByVal sender
As System.Object,
ByVal e As System.EventArgs)
Handles btnAgregar.Click
Dim dbConnection As
New SqlConnection(cnString)
Dim sqlInsert As
String = "INSERT INTO ventas (nroventa, id, cantidad, preciounitario, subtotal,fecha) "
Dim sqlValores As
String = "VALUES('" &
CSng(lblVenta.Text) &
"', '" & CSng(lblDesc.Tag) &
"', '" &
CSng(txtCantidad.Text) & "', '" &
CSng(lblImporte.Text) &
"', '" & CSng(lblSubt.Text) &
"',' " & lblfecha.Text &
"')"
Dim cmd As
New SqlCommand(sqlInsert + sqlValores, dbConnection)
dbConnection.Open()
cmd.ExecuteNonQuery()
dbConnection.Close()
lblDesc.Text =
"Descripción del producto"
lblStk.Text =
"Stock actual"
lblImporte.Text =
"Importe unitario"
txtCantidad.Text =
""
lblSubt.Text =
"Subtotal"
calculoTotal()
End Sub
Alguin sabe como actuliar la tabala sin cerrar la palicacion?
Muchas gracias