Ssql = "SELECT Count(*) as NoOfJustifyRecs FROM Purchase_Justify WHERE PJ_Po_Number = '" & cbo_Order_Number.Text & "'" da = New OleDb.OleDbDataAdapter(Ssql, cn) da.Fill(ds, "NoOfJustifyRecs") cn.Close() If ds.Tables("NoOfJustifyRecs").Rows.Count = 0 Then ' do something End If
If NoOfJustifyRecs = 0 then ' do something EndIf
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)