[solved]get other columns from base on selected row in dbgrid
i have a dbgrid with databinding to mssql db table "RESULTS", the dbgrid displays all results that belong to currrent logged in user. the select sql is:
RID is the pk of table RESULTS, but not displayed in the dbgrid.i have a button "giveRID", now i select a row in the dbgrid, when i click on the button "giveRID", i want the program to figure out the value of RID for selected row. can anyone help me on code plz?
i have a dbgrid with databinding to mssql db table "RESULTS", the dbgrid displays all results that belong to currrent logged in user. the select sql is:
VB.NET:
SELECT RESULT.STARTTIME, RESULT.ENDTIME, RESULT.TOTALMARKS, RESULT.GRADE
FROM TEST INNER JOIN RESULT ON TEST.TID = RESULT.TID INNER JOIN CYMUSER ON TEST.UID = CYMUSER.UID AND RESULT.UID = CYMUSER.UID
WHERE (TEST.TNAME = @TNAME) AND (CYMUSER.UNAME = @UNAME)
Last edited: