Answer» Hi
Is there a way to check the value of a statement that RETURNS a select query? Here is the one line of code that I am talking about: Return "Select a.CASE_NO_ID , a.SURNM_X, b.APP_INDEX_ID, b.VRDCT_I From WORK_OBJ a, APLCN b where (a.CASE_NO_ID = b.CASE_NO_ID) and (a.CASE_NO_ID = '" & CaseNumber & "') and (a.CHNGE_DATE_TIME_D >= '" & StartDate & "' and a.CHNGE_DATE_TIME_D <= '" & EndDate & "') "
I PASS this value to another function which populates a datagrid. I am using ASP.NEt and VB.net. I need to see if the above value is empty or null. That is, if there are no ENTRIES in the DB that match the select statement criteria, and thus is null. Currently if its null the program breaks.
Not REALLY enough information to go on, but if you are using an OleDbDataAdapter and have defined a datatable as the source for the GRID, you can use the datatable properties rows.count to check if you returned any records.
Good luck. 8-)
|