Architecture :: Loop Through Large Collection 100 Records At A Time?
Jan 21, 2011
I am building a small mass email application for my department. Which basically emails out a notice to a large list of email addresses. Because the company email server limits the amount of email addresses that can be contained in a single email I have to break the list apart into smaller 100 email groups.
I've create the query to pull all email addresses needed, stuffed them into a collection but I am not sure how to grab 100 emails at a time and send it off to another sub to perform the email send before grabbing the next 100.
This is what I have so far.
[Code]....
View 5 Replies
Similar Messages:
Nov 10, 2010
[Code]....
this is my html code
[Code]....
this is my code behind
[Code]....
this is my bal code
acuttally
in my javascript popup i am getting the checked values but i need it in record by record in the lblsave data
View 2 Replies
Dec 10, 2010
I am getting out parameter of type DbType.Xml in .net code. What is the better way to loop through all the records and do some operation.
View 1 Replies
May 11, 2010
I need to loop through all my db records, append some text a specific column (for all records), and save back to the db.
View 3 Replies
Apr 4, 2010
I am currently working on a page that has 13 gridviews in it. Each one is in a control and a separate updatepanel. The time from link click to page load is 20 seconds though and I am looking for ways to load the controls asynchronously so that the page can load and then the data can come after. I have tried a few different methods so far but have been unsucessful so far. I thought about using the Ajax incremental page display pattern but I did not think this would work because it only returns html. I need to load the gridviews in and they need to support pagination and sorting.
View 5 Replies
Feb 4, 2010
I have a scenario which I am looking at where large files which are about 30-40 MB are being FTPed to a server. I am looking at creating a .net screen with the FTP control to upload the file to a Unix server. I need to know how much of a performance hit it is to work with such large files, is it a feasible option in this scenario? I might have to create a .net component for the same and call from ASP application. Is it doable?
View 3 Replies
Jul 11, 2010
how a large ASP.NET webapplication can be structured / designed with "subwebs" !? In other words I want to structure a large web-application where I have a solution with more web-application projects. These projects are more or less independent "modules". One project should be a kind of frame application with shared masterpages, an shared sitemap and and a shared authentication. Later it should also be maybe possible also to integrate loosely older websites (which where written in classic ASP. ASP.NET 1.1, ASP.NET 2.0), but this not so important at the moment
View 1 Replies
Feb 17, 2010
I need to create a method which looks through a large string of text, and determines which words (apart from words like "a" "and" "the") are the most frequently used. I would like to determine which are the top 3 most frequently used words in a string of text...is this possible?
View 4 Replies
Oct 5, 2010
I have a project that will be assigned to me soon whereby I need to develop a survey which needs to support 40,000 users approximately. Now we are thinking of doing a staged approach so not all users are on the server at any one point of time. Probably splitting it so we can serve at least a few thousand of users...
I dont have much experience of how I can ensure to serve those levels of users on a server and how to manage this so I am after some advice?
From my understanding I need to do some stress testing on a server and obviously I need some figures i.e. average size of request, average size of response and content of response.
- Do I have to build the database and add records in to see what size is a typical survey row?
- Do I have to build the survey in .NET i.e. by adding controls etc and seeing what size is the page?
- The survey shouldnt be too instensive processing wise, it will be adding information into a backend sql database...
View 4 Replies
Oct 16, 2010
I have a table growth 100000row per day, I'm facing many problems to export data from this table using ASP.net page.
I don't know how to apply this scenario:
Senerio 1:
1- run Asynchronous function to export data from SQL for specified period to CSV file (without locking the table)
2- Refresh page every 5 sec in order to track the status of extracting data
3- compress the file
4- Stop refreshing and showing the download link in order to download the compressed file
or
Senerio 2:
1- run Asynchronous function to export data from SQL for specified period to CSV file (without locking the table)
3- compress the file
4- send the compressed file by Email
View 3 Replies
Jun 30, 2010
I am using multiple threads in my .net web application. Certain functions may need to execute at any arbitrary time. However, I do not need these (and the entire application) to be fully asynchronous, as there is an acceptable tolerance in this execution time. Here is a rough example of what I need to do:
main()
{
loop
{
if (flagA) then doTaskA();
if (flagB) then doTaskB();
}
}
...where flagA and flagB are set via asynchronous timers in critical section. The actual execution of the requested tasks would thereafter run in series.
This is very easy to do in C/C++, etc. But I cannot find any access to such control in .NET, specifically in the web server/application architecture. It may be that it doesn't exist; however, I am assuming that the server must do something of this sort as it manages applications. I would like to hook into that somehow; even if via some application function that is called regularly during this loop.
View 18 Replies
Mar 10, 2010
I want to insert a large amount( approx 7000 records) of data into a table, My scenarios is that i need to check whether the record already exists then it will not insert it. Currently i am using a stored procedure for this which gets called for each record.
IF EXISTS(SELECT 'True' FROM MYTABLE WHERE ID = @ID)
BEGIN
--This means it exists, return it to ASP and tell us
SELECT 'This record already exists!'
END
ELSE
BEGIN
--This means the record isn't in there already, let's go ahead and add it
SELECT 'Record Added'
IF EXISTS(SELECT 'True' FROM [Aadil].[dbo].[SharePointSitesData] WHERE ID <> @ID)
View 11 Replies
Jul 12, 2010
Equivalent of recordset.Edit, Movefirst,NoMatch of vb6 in vb.Net? I want to fetch records from single table of database(Sql server 2005) and collect in collections. How can we do that by dataset and dataadapter ? We want to fetch not to display.
View 1 Replies
Mar 19, 2010
im learning t-sql, infact i needed its while-loop to loop through records of a table, i found this code in some book:
[Code]....
i understand here that setting the rowcount variable to 1 will force the select statements to return only one record, do all above select statements return one record only?
if the underlined select statement returns one record everytime it is executed, isn't it supposed to return the same first record of the table everytime? is there a better way to loop through a table's records?
View 9 Replies
Feb 1, 2010
I need to do an update a field in database every x minutes. ie: a person login and I need to update a field related to they every X minutes until the value reach a value. Like this, this person start a count event from 1 to 10, they log off the web, but this count must remain countting until reachs 10, 1 by 1 every 7 minutes. I cannot do a SQL Job. Should I User a System.Timer??? Should I record the time and value of the last update, when the person log in I cauculate and update the value??
View 4 Replies
Jul 28, 2010
I am working with VS 2010, Entity framework, SQl-Server 2005, ASP.Net web forms. Currently, I am working on the Data access layer library which soon will be a web service, using Entity Framework collaboration with different design patterns like repository pattern and some best practices that posts in different blogs. I am also test each repository using the Unit testing project. Thumbs up! Working fine.
The thing I am worried about is, how much is good for retrieving data from a table that can contain 80-100k records ?
View 1 Replies
Jul 24, 2014
I have an ASP.net VB Web app I'm working on that has a requirement to provide a list of all our component part numbers to our engineers for selection into a custom Bill of Materials for reworking of an assembly. The list of part numbers is currently generated from a stored proc in our MRP systems/SQL database. The number of records being generated is slightly over 39K part numbers.
Although the SP only takes a few seconds to generate the data the web page is taking a couple of minutes to load, primarily because of the time to fill the control presenting the records to the engineers. I've bound the data to a combobox control to the engineer. They want to be able to type the first few characters of the part number if they know it and have the list filtered or be able to just scroll the data to find the part they are looking for.
I've read elsewhere that they may be a way to only populate a certain quantity of records rather than all 39K then filter based on the users actions. Unfortunately the discussions about doing this didn't provide any examples, references, etc.
My questions are these...
Is there a better way to handle this quantity of records than a stored proc and combobox? A
ny examples of a method to populate a certain number of records then filter based on user action?
View 2 Replies
May 21, 2012
I am having nearly more than 80 thousand records and i need to export in .csv format.
I need to export to woksheet.
I need to export nearly 65 thousands of records in one sheet,
When it reached the limit, it should exported in the next sheet.
View 1 Replies
Dec 4, 2012
In my database m having 1000 record and I want to display 10 record on each page on gridview so every time it fetch 1000 record so while page loading it is quite time consuming ..
View 1 Replies
Jul 13, 2012
I follow the following link for add dropdownlist in gridview.Adding Dynamic Rows in GridView with DropDownLists in ASP.Net..In this template field the drop down list contain 500 items how can i search the paticular item
View 1 Replies
Sep 6, 2010
this is my code
[code]....
basically, the InstellingGegevens table gest filled in by some procedure from another server.
the thing i then need to do is check if there are new records in this table, and fill in the new ones in Instellingens.
this code runs for like 4 minutes on 15k records. how do I optimize it? or is the only way a Stored Procedure?
this code runs in a timer, running every 6h. IF a stored procedure is best, how to I use that in a timer?
[code]....
View 3 Replies
Mar 25, 2011
using sql server 2005.
i need to query a table which normally will return multiple records for the id and I need to loop through probably using a cursor and pull values out from each record to make a string.
what is the syntax for this? i've seen cursors using a set number (EX: loop through 5 times) but I need to create a query so that I can loop through once for each row returned from my query.
View 13 Replies
Sep 13, 2010
It is a very large .txt file (more than 3M), and produced everyday, the content is user's system log like below:
2007-11-01 18:20:42,983 [4520] INFO GetXXX() SERVICE START
2007-11-01 18:21:42,983 [4520] WARING USER ACCESS DENIED
2007-11-01 18:22:42,983 [4520] ERROR INPUT PARAMETER IS NULL CAN NOT CONVERT TO INT32
2007-11-01 18:23:59,968 [4520] INFO USER LOGOUT
View 14 Replies
Sep 30, 2010
I'm trying to delete a bunch of records in mysql. The record info to delete (userid, name) is stored in an arraylist. It seems to only delete the first record and gives an error ("Transaction has already been rolled back or is not pending.") afterwards. I have the transaction commit inside the loop which I think is the issue but not sure how to go further if I bring it outside of the loop. Here's the relevant bits of the code.
try
{
ArrayList alist = new ArrayList();
//alist gets populated with data like (12345,robot)(23456,car) here.
MySqlConnection conn2 = new MySqlConnection(query_connection);
conn2.Open();
MySqlCommand command2 = conn2.CreateCommand();
MySqlTransaction mytransaction;
mytransaction = conn2.BeginTransaction();
command2.Transaction = mytransaction;
for (int i = 0; i < alist.Count; i++)
{
string[] s = alist[i].ToString().Split(',');
try
{
command2.CommandText = "DELETE from users_settings WHERE UserID=" + s[0].ToString();
command2.ExecuteNonQuery();
command2.CommandText = "DELETE from users WHERE ID=" + s[0].ToString();
command2.ExecuteNonQuery();
mytransaction.Commit();
}
catch (Exception e){
mytransaction.Rollback();
}
}
}
catch(Exception e){
}
View 1 Replies
Jun 28, 2010
internet Explorer cannot display the webpage when trying to upload a large image.I have a webform for inserting images. There are four FileUpload controls on the page, allowing the user to upload 4 images at the same time. It inserts them directly into database, in Image field, but before that I am resizing them to 200px x 160 px.
The problem I am having is as follows: If I try to upload larger images (over 2MB), one at the time, everything goes fine. But if I try to upload 2 or more larger images at the same time, I get the message: Internet Explorer cannot display the webpage, and there is a button below: Diagnose Connection Problems.
Can you please point me to what could be an issue? It obviously has something to do with the image size, but I have no idea what.
View 2 Replies