TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Carlos kambui
NA
499
124.6k
check if value already exist
Apr 10 2017 8:21 AM
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
Reply
Answers (
5
)
show the database graph chart
How to Get the Last Record from SQL Table