Click here to Skip to main content
Sign Up to vote bad
good
Hi All,
I am developing a windows application which using VS 2010, in this application I am using firebird 2.5 database and c#.net language.
 
when i am debugging my application I am getting an error message, showing "Cannot evaluate expression because a native frame is on top of the call stack" I am getting this message at the step 3.

1. if (IsAlreadyRunning())
2. {
3. SwitchToCurrentInstance();
4. return false;
5. }</pre>
6. Application.Run(frmMain);

in my singleinstanceApplication class and also at the while statement for reading the data from the DataReader object.
FbDataReader reader;
                       cmd.CommandText = "select acct_name from iaccounts where comp_id=" + GlobleData.Companyid +" Order By (acct_name) asc";
                       reader = cmd.ExecuteReader();
                       if (reader.HasRows == true)
                       {
                           while (reader.Read())
                               autoCompleteStringColl.Add(reader["Acct_Name"].ToString());
                       }
 

What are the reason for this type of errors? Can any one solve my doubts Please.
Posted 24 Jul '12 - 22:19

Comments
Sandeep Mewara - 25 Jul '12 - 5:38
You need to share what are you doing in SwitchToCurrentInstance
subrahmanyam1987 - 25 Jul '12 - 5:41
In this I am looking for the instance of my application if the instance not there I have to create an Instance for my application else I have to switch to current instance of my application means opened application.

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 343
1 Sergey Alexandrovich Kryukov 138
2 Mohammed Hameed 123
3 Santhosh G_ 113
4 Ron Beyer 84
0 Sergey Alexandrovich Kryukov 8,266
1 OriginalGriff 6,516
2 CPallini 3,533
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid