i have a table stock with column stock_id,stock_code stock_desceription etc
stock_id is the primary key while i have stock_code is indexes/key i want stock_code to be unique i every row,am able to do so and also am able to check whether stock_code exist before i insert,now my question is how can i be able to check for dublicate before i update,
below are my code that check before i insert
tStock = svcClient.GetLocationStocksByScanCode(MainConn, cbolocation.SelectedValue, TxtScancode.Text).FirstOrDefault
If Not IsNothing(tStock) Then
MessageBox.Show("Item already exist in the location!", "Softbit Tech")
Return
End If
now what can i do to check before i update
Ramesh BarikPosted Apr 12, 2017, 5:09 AM
Carlos kambuiPosted Apr 12, 2017, 4:53 AM
Ranjeet PatraPosted Apr 12, 2017, 3:21 AM
Ramesh BarikPosted Apr 12, 2017, 3:05 AM
Jitendra ShekhawatPosted Apr 10, 2017, 8:37 AM