Curtis Rutland's Profile User Rating: *****

Reputation: 4805 Guru
Group:
Moderators
Active Posts:
8,697 (4.55 per day)
Joined:
08-June 10
Profile Views:
88,270
Last Active:
User is offline Yesterday, 03:00 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
1050
Expert In:
C#, LINQ, Dynamics CRM

Latest Visitors

Icon   Curtis Rutland has been promoted!

Posts I've Made

  1. In Topic: sql totals to labels rather than DGV

    Posted 1 Sep 2015

    Quote

    When I click the button, the form pops up and the
    two labels get populated along with a message box that says

    "There is already an open DataReader associated with this
    Command which must be closed first".


    I'm about ready to see a screenshot, because of the confusing terminology here. When you say "a message box that says...", do you literally mean a MessageBox like this:

    Posted Image

    Or a Visual Studio window that shows an exception, like this:

    Posted Image

    If it's the first, that's because you've got your own custom code handling the error. And it's "handling" it by showing a messagebox and throwing away the error. That's a problem for two reasons: one, it's obfuscating where the actual error is happening at, and two, it's bad to discard errors unless you specifically know you can; they happen for a reason.

    If it's the second, then I have to repeat the question again: what line is it popping up on?

    Lastly, let's see the entire code that this code snippet is working in. As far as I can tell, there's no way you can get that error if it's that's all the code that's running, because you're creating the DataReader and the Command right there. If, however, the rest of the code that runs after it tries to reuse that Command or Reader, you could run into that issue.

    Is this code you initially wrote yourself, or are you supporting someone else's code?
  2. In Topic: sql totals to labels rather than DGV

    Posted 1 Sep 2015

    Quote

    If it's an exception (and not just the labels being populated incorrectly), what line does it happen on? What is the exact text of the error message? Exact.


    What line does it happen on? What is the exact text of the error message?

    Frankly, I'm not going try to dig any more information out of you. If you can't bother to provide us with the information you've been asked for to help you fix your program, then it's not worth our effort to continue to help, because you don't respect us enough to help us help you.
  3. In Topic: sql totals to labels rather than DGV

    Posted 1 Sep 2015

    You're making this harder for us to help you, not easier. First of all, you said this:

    Quote

    The labels are populated but with the following error
    "There is already an open DataReader associated with this Command which must be closed first"


    Do you mean that the labels themselves are populated with that error message, or that they get the right values, but then this error happens? Or that they're populated incorrectly, then that error happens?

    If it's an exception (and not just the labels being populated incorrectly), what line does it happen on? What is the exact text of the error message? Exact.

    My guess is that there's more code after this that tries to re-use the command object, but without knowing where and specifically what the error is, we can't really say.
  4. In Topic: sql totals to labels rather than DGV

    Posted 1 Sep 2015

    Well, that's one way. You've already got your data loaded, and loaded into a DataTable. Just delete the line that populates the DataGridView, and write the code to grab the values out of the DataTable and put them into the labels. The query could pull more than one row though...what are you going to do if you have more than one result?
  5. In Topic: Dynamic Checkbox Not Creating

    Posted 1 Sep 2015

    Don't try to use what you learned about Windows Forms UI components in WPF. Come in with a clean slate. All the backend stuff, the C# stuff is still valuable, but the UI controls do not behave the same way in WPF; they're fundamentally different in both the way they are created and managed, as well as how they should interact with your codebehind.

    Long story short: they have similar names, but that's it. Don't worry about what is and isn't similar to windows forms...it's all different.

My Information

Member Title:
(╯□)╯︵ (~ .o.)~
Age:
31 years old
Birthday:
August 29, 1984
Gender:
Location:
San Antonio
Forum Leader:
C#
Full Name:
Curtis Rutland
Years Programming:
7
Programming Languages:
C# -- Forms, WPF, Silverlight, WCF

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://curtisrutland.com
Skype:
Skype  insertAlias_bytes
Twitter:
curtisrutland

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    NewRandomUsername Icon

    06 Jun 2014 - 20:59
    Did you get my messages(emails) sir?
  2. Photo

    BenignDesign Icon

    03 May 2013 - 13:29
    I see you were staring at my profile. I also stare randomly at profiles. We have much in common. We should probably hook up sometime. Just sayin.
  3. Photo

    eric wallace Icon

    31 Jan 2013 - 02:53
    can you help for visual basic
  4. Photo

    no2pencil Icon

    06 Dec 2012 - 08:34
    It still isn't good enough.
  5. Photo

    ikram002p Icon

    27 Jun 2012 - 10:51
    "It Doesn't Work!" That's not good enough!
    It Still Doesn't Work!.
    I didnt undestand it ??
  6. Photo

    tlhIn`toq Icon

    18 Mar 2012 - 11:22
    Congrats on breaking 3000
  7. Photo

    Curtis Rutland Icon

    08 Sep 2011 - 14:13
    "Leveling up." I like that!
  8. Photo

    MATTtheSEAHAWK Icon

    08 Sep 2011 - 13:55
    Yar ya see, i remember when yee wer purple!
    Anyways congrats! It's weird seeing people who've been one way so long "leveling up" :P.
  9. Photo

    Curtis Rutland Icon

    08 Sep 2011 - 12:59
    Thanks!
  10. Photo

    Sergio Tapia Icon

    08 Sep 2011 - 12:29
    Congrats on becoming a mod. :D
  11. Photo

    Ace26 Icon

    15 Jun 2011 - 13:39
    Hi mate, interesting to see we are age mates. Nice work you do in the forums.
    Just dropped by to say hi, anyways.
    Cheers.
  12. Photo

    RetardedGenius Icon

    20 Apr 2011 - 18:56
    Excellent C# tutorials, they've taught me a lot I didn't know. Please keep more of the good stuff coming! :D
  13. Photo

    Curtis Rutland Icon

    24 Mar 2011 - 14:55
    Yeah, felt like "professionalizing".
  14. Photo

    Dogstopper Icon

    23 Mar 2011 - 17:08
    Woah. Name switch! I took a double take...
  15. Photo

    CodingSup3rnatur@l-360 Icon

    01 Mar 2011 - 14:35
    No problem at all. Glad I could contribute :)
  • (2 Pages)
  • +
  • 1
  • 2