evan liewer

evan liewer

  • NA
  • 25
  • 35.8k

Filter Null Columns

Sep 10 2012 6:07 PM
I have a database table that records medical tests.  Each patient only takes certain tests, so out of the 10 columns, they will only have data in 4 or 5 of them. 

I want to fill a dataGridView on a new form with 2 columns, one with the Column Name, and the second where a doctor can record the lab result.

Picture of the SQL database

Patient Num   WBC    Cholesterol    Pregnant     Herpes
Jon Doe           ""            ""             NULL          NULL

Desire for WinForm

DataGrid View

WBC            ______
Cholesterol   _______

Once the doc enters the values I will update the database.

I thought of doing this at first with XML, and I was able to write XML to the database with blank attributes, but had a hard time updating attributes and thoguht creating this new table would be better.

Answers (5)