vb.net - trying to compare a SQL record count and a DataGridView row count -
i trying compare sql record count , datagridview row count ensure returning same info. example, if have 6 records come sql query, want execute try-catch statement compares row count , sql record count make sure display same number of items. tried:
sql3.addparam("@plan", cmboplans.selecteditem()) sql3.execquery("select dbo.tagsinplan.[tag number] tagsinplan [plan number] = @plan , [plant] ='" & getplant() & "'") sqlrecordcount = sql3.recordcount dgvtagsinplan.rowcount = dgvcount try dgvcount = sqlrecordcount catch ex exception tagsinplan() end try tagsinplan() sub statement in. want rerun sub if datagridview row count not match sql record count
wiki
Comments
Post a Comment