Reading data from Access and save it into an array

Discussion in 'C Programming' started by TeamPhobie, May 25, 2014.

  1. TeamPhobie

    J. Clarke Guest

    Those two lines are setting things up for the subsequent loop--they're
    associating the SQL query stored in the string strSQL with the database
    connection con established two lines previously, and then creating a
    reader object to repeatedly perform that query.

    Note that this is realy a .NET question not related to C at all--the
    ..NET calls would be the same (allowing for differences in language
    syntax) in VB.NET or Powershell.
    J. Clarke, May 27, 2014
    1. Advertisements

  2. TeamPhobie

    James Kuyper Guest

    Just because you knew what you meant, doesn't mean that people who can't
    figure it out are stupid. You expressed yourself poorly.
    You're using C# to access a package(?) named System.Data.OleDb. You'll
    get the best answers in a forum where that package is on-topic, and this
    is NOT such a forum. I know nothing about either C# or that package, so
    the best I can do is guess - but the code seems pretty clear. You're
    sufficiently confused that you're posting questions to the wrong forum,
    and insulting those who you're asking for help, so even my "stupid"
    guesses might be an improvement over your confusion:
    This statement creates a new object of type OleDbCommand, initialized
    from strSQL and con, and stores it in cmd. What initialization actually
    does is up to the designer of that package, but it presumably sets 'cmd'
    up to represent the execution of the SQL query specified in strSQL,
    being executed against the database identified by 'con'.
    The name implies that this line causes the result of the SQL query to be
    read from the database.
    James Kuyper, May 27, 2014
    1. Advertisements

  3. TeamPhobie

    James Kuyper Guest

    On 05/26/2014 06:12 PM, James Kuyper wrote:
    Let me clarify: by "appropriate comment" I mean something like

    // I don't understand the following two lines:

    The actual line you were referring to:


    is a comment, but not an "appropriate" one for this purpose, because it
    contains nothing to clearly identify it as the line that you were
    referring to. I've seen a lot of code containing similar comments solely
    for purposes of decoration.
    James Kuyper, May 27, 2014
  4. TeamPhobie

    Kaz Kylheku Guest

    And then MS ended up in court? I'm confused: which of the two parties
    is it that had the tantrum?
    Kaz Kylheku, May 27, 2014
  5. That's so badly phrased it's hard to tell what you're saying.
    If you're calling the people who are trying to help you stupid,
    that's (to put it mildly) not constructive. It was not clear from
    your previous question which line of code you were asking about,
    which is why you were asked to clarify.

    In any case, you've already been told that this newsgroup does not
    discuss C#. I suggest you (a) find a forum that discusses C# (or, and (b) be more polite with them than you're being with us.

    If you weren't calling us stupid, then some of the above doesn't
    apply -- but I still suggest you take some time to write more
    clearly than "Ye stupid".
    Keith Thompson, May 27, 2014
  6. TeamPhobie

    marvin.radke Guest

    I'm sorry if people here thought i call them stupid. Actually i meant that i was stupid for saying line.
    Yes i already know this is the wrong forum (recognized it as people started to make fun of me).
    anyway thanks for the tries to help me and good bye.
    marvin.radke, May 27, 2014
  7. TeamPhobie

    James Kuyper Guest

    Self-deprecation can be dangerous in a medium where readers can't get
    any clues from facial expressions or tone of voice. Unless you're
    careful, a few typos can leave people unaware that it was, in fact,
    targeted at yourself.

    Simplest correction:

    "Ye[s, I was] stupid to speak of [a] line in [the] code."
    James Kuyper, May 27, 2014
  8. TeamPhobie

    Kaz Kylheku Guest

    I am sorry they are stupid too.
    Kaz Kylheku, May 27, 2014
  9. Kiki and his ilk on this newsgroup are nothing but professional victims.

    They long for the opportunity to feel insulted - and when they find it,
    they milk it for all its worth.

    (This discussion group is about C, ...)

    Wrong. It is only OCCASIONALLY a discussion group
    about C; mostly, like most "discussion" groups, it is
    off-topic Rorsharch [sic] revelations of the childhood
    traumas of the participants...
    Kenny McCormack, May 27, 2014
  10. .... and that license was contingent on MS's Java being "compatible" with
    Sun's Java. It was not, therefore the license was void and they were
    guilty of copyright infringement.
    Microsoft also licensed the Java trademark from Sun under the same
    terms, so my above clarification applies to that as well.
    The intent behind Sun's strict licensing of the Java trademark and code
    was reasonable; their implementation did indeed leave a lot to be
    desired, but it was their stated intent that others could develop their
    own--as long as the _interface_ remained compatible with Sun's.

    Compare to C, which 25 years after initial standardization still faces
    severe portability problems due to many different dialects, granted not
    as many as there were prior to standardization. Imagine if ISO could
    sue implementors who used the C name but didn't strictly conform.

    Stephen Sprunk, May 28, 2014
  11. TeamPhobie

    Noob Guest

    Noob, May 28, 2014
  12. TeamPhobie

    Richard Bos Guest

    The choice of a bad tool is no excuse.

    Richard Bos, Jun 2, 2014
  13. TeamPhobie

    James Kuyper Guest

    I believe it was provided as an explanation, not an excuse. While Google
    Groups is a bad tool, a newbie (even a smart one) can use it to post
    messages for a long time without noticing any of it's problems.
    James Kuyper, Jun 2, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.