0

Hi guys,, im having problem with my stored procedure. i dont know how to make it show..when i click on a particular record on my datagridview it should display another form with its corresponding laboratory records, radiology records and so on..


here is my code

ALTER PROCEDURE dbo.ViewAllLabRecords
(
@lab_Record_ID int
)
AS
 SELECT * FROM Laboratory_Records LR JOIN PT_Chart PTC
 ON LR.Lab_Record_ID = PTC.Lab_Record_ID
 WHERE LR.Lab_Record_ID = @Lab_Record_ID;

pls help me solve this one

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by bettybarnes
0

So you want to populate the second grid based on the row you select in the first grid , right,

1. Capture the PK of the 1st table (when you select the row on the 1st grid)
ex--patient id

2. Use the same value to fetch data from the 2nd table, by using in the where clause.

Populate the send grid with the retrieved recordset / dataset.

0

no ahm the listview at the bottom is for my search displays.. what i want is when i click the view selected patient chart it will display another form and show the laboratory records


can you give me sample codes?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.