Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,

I'm working in c# console application..My problem is when i debug the application, if i try to open the data table for viewing retrieved db data, it shows exception.
Exception : function evaluation timed out..
how to solve this problem..
pls help me
Posted
Updated 12-Sep-11 19:12pm
v2
Comments
Mehdi Gholam 13-Sep-11 1:07am    
Post your code.
Vidhya M 13-Sep-11 1:16am    
public DataTable GetDeletedTasks(string sKeySafeSerialNum,int iIsFactoryDefault)
{
DataTable dtDeletedTasks = new DataTable();
try
{
Sqlcon.Open();




SqlCommand cmdDeletedTasks = new SqlCommand("SP_GetDeletedTasks", Sqlcon);
cmdDeletedTasks.CommandType = CommandType.StoredProcedure;

cmdDeletedTasks.Parameters.AddWithValue("@KeysafeSerialNo", sKeySafeSerialNum);
cmdDeletedTasks.Parameters.AddWithValue("@IsFactoryDefault", iIsFactoryDefault);




SqlDataAdapter daDeletedTasks = new SqlDataAdapter(cmdDeletedTasks);

cmdDeletedTasks.ExecuteNonQuery();
daDeletedTasks.Fill(dtDeletedTasks);

cmdDeletedTasks.Dispose();
Sqlcon.Close();
}
catch (Exception ex)
{
objLog.LogEvents("Error", ex.Message, "GetDeletedTasks");
}
return dtDeletedTasks;//.Tables[0];
}

1 solution

There is a setting by which VS debugger decides how much time to wait before time out exception occurs. One can override this value :

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Debugger

At above location in the registry you will find two keys :
1. NormalEvalTimeout
2. QuickwatchTimeout


You need to change the values for these keys. The value for them is in milisecond.

Default Values :
1. NormalEvalTimeout : 5000 ms
2. QuickwatchTimeout : 15000 ms


Hope this helps.
All the best.
 
Share this answer
 
Comments
Vidhya M 13-Sep-11 1:30am    
Thanks a lot.. but how can i change that values.. where?
Pravin Patil, Mumbai 13-Sep-11 1:37am    
go to run.
Type regedit
navigate to above mentioned link and change the value.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900