Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
con.Open();
                  SqlCommand cmddr=new SqlCommand("SELECT * FROM Credit WHERE ID='"+Session["DID"]+"'",con);
                  SqlDataReader drcredit = cmddr.ExecuteReader();
                  if (drcredit.HasRows)
                  {
                     
                      while (drcredit.Read())
                      {
                          string ref1 = drcredit["ref"].ToString();
                          string refid = drcredit["refid"].ToString();
                          string crdol = drcredit["valuesdol"].ToString();
                          string crrs = drcredit["valuesrs"].ToString();

                          
                          con.Open();
                          SqlCommand cmdmp = new SqlCommand("SELECT * FROM Party_Master WHERE refid='" + refid + "'", con);
                          SqlDataReader drmp = cmdmp.ExecuteReader();
                          if (drmp.HasRows)
                          {
                              drmp.Read();
                              string crdoller = drmp["crdol"].ToString();
                              string crrupess = drmp["crrs"].ToString();
                              Session["crdoller"] = crdoller;
                              Session["crrupess"] = crrupess;
                              drmp.Close();
                          }
                          con.Close();
                         
                      }
                  }
Posted
Updated 27-Sep-14 0:39am
v2
Comments
bhagyadeep 27-Sep-14 6:34am    
PLZ HLP ME!!!!!!!!!!!
[no name] 27-Sep-14 6:39am    
Who is "PLZ"? Why are you screaming at him? If you want plz to help you would would have ask and actual question or describe a problem instead of just dumping your unformatted code here and expecting people to try and figure out what you are trying to do.
bhagyadeep 27-Sep-14 6:40am    
I WONT TO ADD DELETE QUERY IN SQLDATAREADER LOOP
[no name] 27-Sep-14 6:46am    
Okay so go right ahead and do that. Screaming at me is not going to get it done for you anymore than screaming at plz would.
King Fisher 27-Sep-14 6:48am    
Use Lowercase Letter while your conversation.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900