Posted on: 5/6/2014 7:20:44 AM | Views : 428

Hi..
Supervisor only can view his/ her supervisee in a gridview. Supervisor can have many supervisee at a time where supervisee can only have one supervisor.
In a table that I have, there are user id for supervisor(EMSPVR ) and supervisee(EMNUM ). But when the supervisor logged in, he will user username and password. not userid. How can I write a query on that?
At first my code was like this:
string queryString = "SELECT EMNUM FROM QMBSTEST.TBLMTX WHERE WHERE EMSPVR = '" + svid.ToString() + "'";
but I got error saying that the data is null. how can I get the username?
I have another table that store the username(EMUSID). How can I use these two tables?

Go to the complete details ...