473,394 Members | 1,766 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,394 software developers and data experts.

Delagate vs. BackGroundWorker vs. Web Service

Do I :

1) use a Delegate which calls my method below (the method below is using the
EnterpriseLibrary.Data namespace for 2.0)

or

2) Use some sort of implementation of BackGroundWorker
(http://www.devx.com/dotnet/Article/22358/1954?pf=true) in
System.ComponentModel to perform a call to my method asynchronously?

3) Create a web service then execute the method using the web service and a
delagate

Also, how can I check if it is running asynchronously after I implement
either 1 or 2; what methods can I use to test after I figure this out?

This is for a public website, about 1.5 million users hit it per day, and
we'll be doing a ton of inserts per minute or even second for a specific
process which this method will help in.

Currently this method takes an incoming Search String, calls my stored proc,
and inserts stuff into my table via the defined parameters. I'm using
methods from Enterprise Library 2.0 to perform the insert and we want to keep
it that way. I just need to know how to call this asynchronously. I am a
beginner in this so be easy on me and explain. Thanks for any help!!!!

public static void InsertSearchTerm(string SearchTerm)
{
DateTime CreateDate = DateTime.Now;
Int32 ResultCount = 1;

try
{

DatabaseFactory.CreateDatabase().ExecuteNonQuery(" insert_storedproc_name",
SearchTerm, ResultCount, CreateDate);
}
catch
{
throw;
}

Or do I use a web service and things like IAsyncState
--
dba123
--
dba123
Jul 26 '06 #1
0 1172

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

Similar topics

5
by: Rob R. Ainscough | last post by:
I'm using a BackgroundWorker to perform a file download from an ftp site. Per good code design practices where I separate my UI code from my core logic code (in this case my Download file method in...
1
by: Bob | last post by:
Hi, I am having trouble seeing how this bolts together. The UI starts a process which involves a long running database update. All Database activity is handled by a class called DT. DT has a...
14
by: =?Utf-8?B?SXNobWFlbA==?= | last post by:
Hi, I have a form with a progress bar on it and wanted to use the BackgroundWorker to be able to update the progress. I looked at examples, run some of them, but in debug, when the code gets to...
0
by: Chris | last post by:
I would like to be able to pass the BackgroundWorker object and DoWork Event Args to a second function (third function?) and be able to still report the progress. I'm getting the following...
2
by: Chris | last post by:
When I try to access the backgroundWorker.CancellationPending property I get the following exception: An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in...
9
by: RvGrah | last post by:
I'm completely new to using background threading, though I have downloaded and run through several samples and understood how they worked. My question is: I have an app whose primary form...
4
by: Sin Jeong-hun | last post by:
This is what I've always been wondered. Suppose I've created a class named Agent, and the Agent does some lengthy job. Of course I don't want to block the main window, so the Agent does the job in...
1
by: Steve K. | last post by:
I'm working on my first remoting project. It's going well and I have one (that I know of!) bug left to work out. I understand how remote objects have leases and those leases expire. I fixed a...
2
by: Marcel Overweel | last post by:
Hello, I am using a BackgroundWorker as a base class for several workers in a windows service application. Because BackgroundWorker is derived from Component, Visual Studio (2008) shows the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.