0
simply return null value in the else statement in the calling method compare the return value if is null give the access id denied message (or) you create the one dataset which contain the this error message as follows and return that value
DataSet ds = new DataSet();
DataTable dt = new DataTable("msg");
DataColumn dc = new DataColumn("col1");
dc.DataType = typeof(string);
dc.ColumnName = "msg";
dt.Columns.Add(dc);
ds.Tables.Add(dt);
DataRow dr = dt.NewRow();
dr[0] = "Access is denied";
ds.Tables["msg"].Rows.Add(dr);
return ds;
Accepted 1
Dear Indian Programmer,
try return Object type instead Dataset.
hope this would help.
Thanks and Regards
-2
Dear Indian Programmer,
Better update your name first, are you hiding from someone?