473,763 Members | 8,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

You must synchronize any write operations... Meaning.......

DataTable Class documentation says.
Thread Safety
"This type is safe for multithreaded read operations. You must synchronize
any write operations."

In my web based application (ASP.Net) developed using Vb.Net on .Net
Framework 1.1. can I write a function which will populate an object(derived
from DataTable Class)? Since it is web based application and because of
multiple user there is a possibality of hitting this function by multiple
users at the same time.

But the documentation says "You must synchronize any write operations".

Please advice.

Smith


Nov 19 '05 #1
1 2176
Smith:

How do you plan to use the DataTable? That's the important questions to answer.
A typical use is to create a DataTable during a page's Load event, perhaps
add some records into the table from the database, and then bind it to a
data grid. After this, the instance is never used again. In these cases a
single instance will never see multiple threads or multiple users.

If instead you keep the DataTable in the Application object, or the Cache
object, or in a static field, then the object is accesible to multiple users
& multiple threads, and synchronization is needed.

--
Scott
http://www.OdeToCode.com/blogs/scott/
DataTable Class documentation says.
Thread Safety
"This type is safe for multithreaded read operations. You must
synchronize
any write operations."
In my web based application (ASP.Net) developed using Vb.Net on .Net
Framework 1.1. can I write a function which will populate an
object(derived from DataTable Class)? Since it is web based
application and because of multiple user there is a possibality of
hitting this function by multiple users at the same time.

But the documentation says "You must synchronize any write
operations".

Please advice.

Smith

Nov 19 '05 #2

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

Similar topics

8
12105
by: Zlatko Matiæ | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
1
3192
by: Mamatha | last post by:
Hi I have one application in VB.NET using mutiple threads. While that application running,threads get some data and placed it into a file.That same file is used contineously by another threads in reading purpose. If we put synchronize in writing mode then how can i read from that file. If we put synchronize in reading mode then how can i write data into that file.
1
2716
by: taleran58 | last post by:
Hi all. I'm writting a multithreading program that will update a loacal Access database. I'm using OleDB connection to get access to the database from each thread and my question is: how do I synchronize between threads\ how do I lock the database so no clashes between threads occurs. do I have to use a diffrent connection\adapters???
1
2025
by: Stephen | last post by:
Hi, Is there a sample application using ASP .NET to synchronize folder contents? I want to synchronize folder contents on 2 different machines Thanks, Stephen
21
2335
by: ashish.sadanandan | last post by:
Hi, I haven't done a lot of C++ programming (done a lot of it in C) and the reason why I'm considering switching now is also the question I'm posting here. I have some library functions that return to me a void* to data that has been specifed by the user. There are also functions that return an enum which contains information about the data type of this data. So what I've done in the past is made a switch case statement based on the...
74
7481
by: lovecreatesbeauty | last post by:
My small function works, but I have some questions. And I want to listen to you on How it is implemented? 1. The function does not check if parameter x is larger or smaller than parameter y. 2. Is it better to use unsigned int or unsigned long as the type of parameters x and y? This change may remove the if statement. More comments are still welcome.
0
2276
by: krupa.p | last post by:
Hi All, I am trying to write a C# .Net desktop application that synchronizes files/folders on the PC with those on a Windows CE device, when the device is connected to the PC via ActiveSync. My requirement is to automatically synchronize a folder on the device (on storage card) with a folder on the computer. I looked at the OpenNETCF.Communications library used the CopyFileFromDevice and CopyFileToDevice functions in it. But I didn't...
2
1408
by: Shraddha | last post by:
On which of the following we cannot perform max. operations? 1. Array 2. Hash Table 3. Linked List 4. Heap 5. Bianry Tree
7
1745
by: Flavio | last post by:
Hi, I have been playing with set operations lately and came across a kind of surprising result given that it is not mentioned in the standard Python tutorial: with python sets, intersections and unions are supposed to be done like this: In :set('casa') & set('porca') Out:set() In :set('casa') | set('porca')
0
9564
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.