473,395 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DB insertion question

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!

Aug 21 '06 #1
2 878
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!

Aug 21 '06 #2
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.

Aug 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Patrick Guio | last post by:
Dear all, I have some problem with insertion operator together with namespace. I have a header file foo.h containing declaration of classes, typedefs and insertion operators for the typedefs in...
18
by: David Frank | last post by:
Is there a preprocessor (or utility) that has option to insert absent braces to clarify control syntax, ie for/while/if/else/etc ? for(.....) for(....) statement; to
5
by: John N. | last post by:
Hi All, Here I have a linked list each containing a char and is double linked. Then I have a pointer to an item in that list which is the current insertion point. In this funtion, the user...
1
by: Sam | last post by:
Hi all Is it possible to remove/disable automatic new row insertion feature in datagrid control(last row with * on the left)? I'm implementing a datagrid table which consists of 4 columns and...
4
by: Andrix | last post by:
Hi, I have a table with 20.000.000 of tuples. I have been monitoring the performance of the insertion and updates, but not convince me at all. The table have 30 columns, what and 12 of it, are...
6
by: Julia | last post by:
I am trying to sort a linked list using insertion sort. I have seen a lot of ways to get around this problem but no time-efficient and space-efficient solution. This is what I have so far: ...
0
by: polocar | last post by:
Hi, I have noticed a strange behaviour of CurrencyManager objects in C# (I use Visual Studio 2005 Professional Edition). Suppose that you have a SQL Server database with 2 tables called "Cities"...
1
by: Gary Brown | last post by:
Hi and Happy Holidays, While typing in a member function an errant finger triggered a bit of code snippet that throws a "not yet implemented" exception if the member is called. It happened...
1
by: =?Utf-8?B?TWljaGFlbCBCbHVtZW50aGFsLCBNQ1NFLCBNQ0FE | last post by:
I am writing a .NET 1.1 C# windows service that writes to a dedicated event log (not the application event log, but one that I created). I want to make full use of all the fields in an event log...
9
by: python_newbie | last post by:
I don't know this list is the right place for newbie questions. I try to implement insertion sort in pyhton. At first code there is no problem. But the second one ( i code it in the same pattern i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.