Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO recordset contains

Status
Not open for further replies.

tictaclam

Programmer
Jan 8, 2004
47
US
Hi
I have a recordset and I want to find out if a particular row is in the set is there anyways i can do this? My code is
strSQL = "SELECT * FROM Program Information"
set objRS = Server.CreateObject( "ADODB.recordset" )
objRS.CursorLocation = adUseClient
objRS.Open strSQL, objConn, adOpenStatic, adLockOptimistic

I need the entire objRS for various reasons but at some point I need to check to see if objRS has a "ProgramID" that equals "AAA" (programID is in the table Program Information). Is there anyway to do this. I feel like it should be easy but i'm having a hard time with it
thanks
 
This should work:


strSQL = "SELECT * FROM [Program Information] WHERE ProgramId = 'AAA'"

If that doesn't work, try this:

SELECT *
FROM [Program Information]
WHERE ProgramID = 'AAA'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top