I have a grid called staff which shows staffNo, name, position.

Does anybody have any ideas how i can retrieve the staff number from the grid and use it in an SQL statement?
eg select name from staffTable where staff_no =** (value from the grid)**.

Thanks

Create a parameter for your SQL query. See this discussion for sample code.

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.