Coming soon - Get a detailed view of why an account is flagged as spam!
view details
3
[Visual studio 2013] SQL statements using global variable
Post Body

Hi All.

So I'm creating my first proper VB program after a chap at work set me an interesting problem. This is for fun and my education only this code isn't going to go live!

The program essentially allows nurses to admit patients to the system then allows them to enter multiple observations (heart rate, blood pressure, temperature etc) which will appear on a grid view until the patient is then discharged.

The issue I'm facing is that obviously a patient can be admitted more than once, so when trying to display the observations

SELECT HR BP Temp etc WHERE Pat_ID = variable

may bring up observations from a different admission. I also can't limit it to todays entries only as entries may span midnight.

I'm currently using an "admission ID" to get round this problem which is a random number generated upon admission.

What I can't figure out is how to pass the variable from the admission form to the observation form in order to include it in the SQL string.

If anyone has any bright ideas, or indeed a more appropriate way to tackle this problem I'd be very grateful!

Thank you in advance,

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
19,598
Link Karma
2,496
Comment Karma
17,050
Profile updated: 2 days ago
Posts updated: 10 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 years ago