DB insertion question

M

^MisterJingo^

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!
 
M

^MisterJingo^

David said:
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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top