Can any body tell me how can i check that record already exists?
Naveed_786
25
Posting Whiz in Training
Recommended Answers
Jump to PostUse the same select statement type -
SELECT * FROM student WHERE StudentName LIKE " & "'" & Nav & "%'"
This will return all the names that has Nav in its text.
Jump to PostYou can use this code to check wether a query result returns a macthing record or not
Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset 'NOTE: you can use AndreRet's given example above this post... rs.Open "YOUR SELECT STATEMENT HERE", cn, adOpenKeyset, adLockOptimistc, adCmdText If …
Jump to Postrs.Open "YOUR SELECT STATEMENT HERE", cn, adOpenKeyset, adLockOptimistc, adCmdText
As in -
rs.Open "SELECT * FROM student WHERE StudentName LIKE " & "'" & Nav & "%'", cn, adOpenStatic, adLockOptimistic
.:)
All 9 Replies
AndreRet
526
Senior Poster
PoisonedHeart
4
Junior Poster in Training
AndreRet
526
Senior Poster
devLady
0
Newbie Poster
devLady
0
Newbie Poster
Naveed_786
25
Posting Whiz in Training
AndreRet
526
Senior Poster
Naveed_786
25
Posting Whiz in Training
AndreRet
526
Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.