SHARE
TWEET

Untitled

a guest Jun 25th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SqlCommand command = conn.CreateCommand();
  2.         command.CommandText = "select Test from PrescTest pt, Prescription p where pt.idPresc=p.idPresc";
  3.         conn.Open();
  4.  
  5.         SqlDataReader dr2 = command.ExecuteReader();
  6.         try
  7.         {
  8.             if (dr2.HasRows)
  9.             {
  10.                 string Tests ="";
  11.                 while (dr2.Read())
  12.                 {
  13.                     // get the results of column "Test"
  14.                     Tests += dr2["Test"].ToString() + System.Environment.NewLine;
  15.                 }
  16.                 TextBox15.Text = Tests.Trim();
  17.                 conn.Close();
  18.             }
  19.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top