I'm making a point of sale with SQL Server 2012 connection but I had a problem. When I read the code of a product, it connects to the database and the product is added to the DataGridView
, but when I read another product, the one I already had is deleted and the new one is added.
I've been reading that there are linked and unlinked tables, dataset
, columns
, rows
, etc
Sub consultaproducto(ByVal bb As String, ByVal dgv As DataGridView)
Try
adaptador = New SqlDataAdapter("select * from producto where nombre like '" & bb + "%" & "'", cn)
dt = New DataTable
adaptador.Fill(dt)
dgv.DataSource = dt
Catch ex As Exception
MsgBox("Problemas al conectar con al base de datos ")
End Try
End Sub
What I want is that by continuing reading the barcode of the products, we continue to add products in DataGridView
.