DB insertion question

Discussion in 'ASP .Net' started by ^MisterJingo^, Aug 21, 2006.

  1. Hi all,

    I have an asp.net page which allows a user to upload an xml file. The
    file is parsed for 2 fields (forename, surname), the result is placed
    in a dataset.
    I next check to see if the user contains specific information in the
    DB, if they don't that data is then inserted.

    To do this I foreach through the dataset table, first checking the DB
    (SELECT) to see if the user returns any records, if they don't, a
    second query is used to insert the needed data.
    Each pass of the foreach I create a new query, add the needed
    parameters (fore/surname), for the SELECT and INSERT parts.
    Im getting 'too many connection errors' using this approach. How would
    others approach such a problem?

    For each dataset row check user record contains certain data.
    If Data doesn't exist, place it in the DB.
    The xml can contain hundreds or evern thousands of entries.

    Any help would be appreciated!
     
    ^MisterJingo^, Aug 21, 2006
    #1
    1. Advertising

  2. What's your database? Access, SQL, etc?

    "^MisterJingo^" wrote:

    > Hi all,
    >
    > I have an asp.net page which allows a user to upload an xml file. The
    > file is parsed for 2 fields (forename, surname), the result is placed
    > in a dataset.
    > I next check to see if the user contains specific information in the
    > DB, if they don't that data is then inserted.
    >
    > To do this I foreach through the dataset table, first checking the DB
    > (SELECT) to see if the user returns any records, if they don't, a
    > second query is used to insert the needed data.
    > Each pass of the foreach I create a new query, add the needed
    > parameters (fore/surname), for the SELECT and INSERT parts.
    > Im getting 'too many connection errors' using this approach. How would
    > others approach such a problem?
    >
    > For each dataset row check user record contains certain data.
    > If Data doesn't exist, place it in the DB.
    > The xml can contain hundreds or evern thousands of entries.
    >
    > Any help would be appreciated!
    >
    >
     
    =?Utf-8?B?RGF2aWQgSmVzc2Vl?=, Aug 21, 2006
    #2
    1. Advertising

  3. David Jessee wrote:
    > What's your database? Access, SQL, etc?
    >


    Ah, sorry about that, I should have included it in my first post. I
    have to use MySQL on this project.
     
    ^MisterJingo^, Aug 21, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    276
    Paul Rubin
    Apr 17, 2007
  2. Colonel
    Replies:
    1
    Views:
    381
    Pete Becker
    Nov 6, 2007
  3. harshu010
    Replies:
    0
    Views:
    291
    harshu010
    May 29, 2008
  4. Indrajeet

    Basic question in binary tree node insertion

    Indrajeet, Oct 11, 2009, in forum: C Programming
    Replies:
    2
    Views:
    718
    Eric Sosman
    Oct 11, 2009
  5. Alex

    Element Insertion question

    Alex, Feb 25, 2006, in forum: Javascript
    Replies:
    3
    Views:
    91
Loading...

Share This Page