This would normally be done in your SQL statement, something like
SELECT field list FROM table WHERE PartID = @PartID
You'd have to pass the ID that your looking for to the SQL stored procedure using a parameterized query. You can read up more on this and why it's a good idea in Colin Mackay's article, SQL Injection Attacks and Some Tips on How to Prevent Them[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome