I need assistance determining how to accomplish the following (if it can be done):
On an html table, for each row of data that was extracted from the SQL server database, the last displayed table column on the screen = the links to the functions that can be performed against that specific row of data (i.e. view, edit, delete).
The links that are available (i.e. view, edit, delete)for a specific row are determined based on whether or not the recordset row has children (i.e. if a row has a child attached to it in the recordset, the data in that row can only be viewed and cannot be edited or deleted).
Data example:
type typeseq owner ownerseq
c 1
a 1 c 1
r 1 a 1
I need to check 'type' and 'typeseq' for each row against every row in the recordset to see if the 'type' and 'typeseq' values are found in the 'owner' and 'owner seq' columns.
Example:
the row where type = c and typeseq = 1 has a child attached to it because its type and typeseq values are in the owner and ownerseq columns for type = a and typeseq = 1.
the row where type = r and typeseq = 1 has no children because there are no recordset rows whose owner = r and ownerseq = 1
I can define a boolean variable as switch to indicate whether a row has a child or not and then, by checking the value of the switch, I can determine which links are available for the data row in the html table.
Currently, which I think is very amateurish and inefficient, I display all possible links on each row and, on submit, I submit the page to itself and call a sub that executes a stored procedure to check for children.
Then, based on the query results (no rows returned = has no children), I either submit the page for further processing of the selected function or display an error message that the selected function is not available for that row of data because there is a child attached.
Thanks!!
On an html table, for each row of data that was extracted from the SQL server database, the last displayed table column on the screen = the links to the functions that can be performed against that specific row of data (i.e. view, edit, delete).
The links that are available (i.e. view, edit, delete)for a specific row are determined based on whether or not the recordset row has children (i.e. if a row has a child attached to it in the recordset, the data in that row can only be viewed and cannot be edited or deleted).
Data example:
type typeseq owner ownerseq
c 1
a 1 c 1
r 1 a 1
I need to check 'type' and 'typeseq' for each row against every row in the recordset to see if the 'type' and 'typeseq' values are found in the 'owner' and 'owner seq' columns.
Example:
the row where type = c and typeseq = 1 has a child attached to it because its type and typeseq values are in the owner and ownerseq columns for type = a and typeseq = 1.
the row where type = r and typeseq = 1 has no children because there are no recordset rows whose owner = r and ownerseq = 1
I can define a boolean variable as switch to indicate whether a row has a child or not and then, by checking the value of the switch, I can determine which links are available for the data row in the html table.
Currently, which I think is very amateurish and inefficient, I display all possible links on each row and, on submit, I submit the page to itself and call a sub that executes a stored procedure to check for children.
Then, based on the query results (no rows returned = has no children), I either submit the page for further processing of the selected function or display an error message that the selected function is not available for that row of data because there is a child attached.
Thanks!!