I translated this part of the code from vb to c# and giving me this error message. "Not all code paths return a value". What is the problem? Thanks in advance.
public DataSet LoadSearchDataSet(string strConnection, string strSQL) { //The purpose of this function is to create and populate a data //set based on a SQL statement passed in to the function. try { DataSet dsData = new DataSet(); //call the table in the local dataset "results" since the values //may be coming from multiple tables. string strTableName = "Results"; bool blnRunStoredProc = false; dsData = PopulateDataSetTable(strConnection, strTableName, strSQL, blnRunStoredProc, dsData); WriteSampleDataToOutputWindow(dsData); //return the data set to the calling procedure return dsData; } catch { //error handling goes here UnhandledExceptionHandler(); } }
UnhandledExceptionHandler, but then what do you expect to be returned?