Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1011673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:16:09+00:00 2026-05-16T09:16:09+00:00

I have a function GetAlertData() that returns a Datatable. I invoke it as: var

  • 0

I have a function GetAlertData() that returns a Datatable. I invoke it as:

var dt = GetAlertData()

Behavior in debug mode:

Case 1: When I do F11 all the time and go into the GetAlertData function, all works well and I get the correct table

Case 2: When I do F10 on this function and step over it, GetAlertData returns a table with all values filled as zero (incorrect). (Columns of my table are all float datatype)

In release mode, behavior is same as pressing F10 in debug mode, i.e again I get all zeros.

Any ideas on what could be the reason, or what I can try to find the reason? Thanks..

Edit: my GetAlertData function is something like this..

internal static DataSet GetAlertData()
        {
            using (var sqlConnection = new SqlConnection(Constants.ConnectionString))
            {
                const string sproc = @"[spo_GetAlertData]";
                var cmd = new SqlCommand(sproc, sqlConnection) {CommandType = CommandType.StoredProcedure};

                cmd.Parameters.Add("@TimeWindow", SqlDbType.Int);
                cmd.Parameters["@TimeWindow"].Value =2
                cmd.Parameters.Add("@ThresholdTime", SqlDbType.Int);
                cmd.Parameters["@ThresholdTime"].Value = 2
                var dsAnalysis = new DataSet();
                var da = new SqlDataAdapter(cmd);
                da.Fill(dsAnalysis);
                if (dsAnalysis.Tables.Count > 0 && dsAnalysis.Tables[0].Rows.Count > 0)
                    return dsAnalysis;
                return null;
            }
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T09:16:10+00:00Added an answer on May 16, 2026 at 9:16 am

    One thing to consider is the difference in execution time using F11 and F10 (stepping into and stepping over methods respectively). F11 steps into a function therefore keeping you in that thread of logic longer than F10 which steps over code allowing it to execute at full speed.

    The point is that you could very well have a timing/threading issue that is alleviated when the application has more processing time caused by the fact that you’re taking more time to step through and into the code with F11. That’s why the release more behavior matches the F10 behavior, faster execution.

    I’m guessing that sprinkling something like Thread.Sleep(250) around the problem area would help too but I do not recommend this. It’s an action of absolutely last resort best used to just test the timing hypothesis. You need to figure out what is running concurrently that might be causing this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have function that have been colled in stored procedure. The function returns a
I have function getMemory() which returns VARIANT (mfc). It is said that in ulVal
I have function in my database class that returns the id of the people
I have function that returns the index of a character GetCharFromPos(Pt: TPoint): Integer; now
In my specific case I have (function(){ and I want to replace that with
i have function that changes background color of element and src of image. in
i have function <script type=text/javascript> $(function () { $(#search).click(function() { var text = $(#searchText).val();
I have function that scrolls to a anchor position in a list function snapToAnchor(anchor)
I have function source stored in a string eg.: var source=(function(){return Math.sin(x);}); I want
i have function: function getFieldNames(arrayOfRecords) { var theStuff; for (var i = 0; i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.