473,779 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

data modification on multiuser environment

hello i am new to asp.net and sql server 2005 programming. i am
wondering how to code asp.net to prevent multiuser from modifying a
share data (on sql server) at the same time. should i do some special
coding on asp.net or sql server, or both? thanks for your help.

Aug 17 '06 #1
3 1807
when you adding the DataSource (using the wizard) click Advance (when it
askes what fields from witch table you want) and check the 3rd option...

when saving, the DataSource will compare the old values to the database and
if they are the same, it will update thoose fields, if they are not, it will
give you an error that you can handle or just telling the user to refresh
the view because the values were changed from the database since the last
request.

--

Bruno Alexandre
"a Portuguese in Kbenhav, Danmark"

"philip" <ma******@gmail .comescreveu na mensagem
news:11******** *************@i 3g2000cwc.googl egroups.com...
hello i am new to asp.net and sql server 2005 programming. i am
wondering how to code asp.net to prevent multiuser from modifying a
share data (on sql server) at the same time. should i do some special
coding on asp.net or sql server, or both? thanks for your help.

Aug 18 '06 #2
so how can i code in a queue way? my idea is, if User_A is modifying
the shared data, and User_B comes in, then how to design to let User_B
wait until User_A has finished the modification? I don't want to throw
exception anyway.

My situation is, the shared data is a counting number that if a user
performs one task, the field will be incremented.

Thanks for your help.

Bruno Alexandre 寫道:
when you adding the DataSource (using the wizard) click Advance (when it
askes what fields from witch table you want) and check the 3rd option...

when saving, the DataSource will compare the old values to the database and
if they are the same, it will update thoose fields, if they are not, it will
give you an error that you can handle or just telling the user to refresh
the view because the values were changed from the database since the last
request.

--

Bruno Alexandre
"a Portuguese in Københav, Danmark"

"philip" <ma******@gmail .comescreveu na mensagem
news:11******** *************@i 3g2000cwc.googl egroups.com...
hello i am new to asp.net and sql server 2005 programming. i am
wondering how to code asp.net to prevent multiuser from modifying a
share data (on sql server) at the same time. should i do some special
coding on asp.net or sql server, or both? thanks for your help.
Aug 18 '06 #3
all you need is to turn the feature on

when performing an update the datasource willl see if the data changed for
the last time that was reading for that page and ask the user to refresh the
page

this is done automatically with nothing to hard-code
if you want to implement your own way, fell free to do so, but this approch
is the best way (read data to gridView 4 example) then when you are updating
you have the oldValues at your disposal

e.OldValues.Ite m("item").ToStr ing under gridview RowUpdating event

just use thoose values to read the same id from the database, if they are
the same, just procedure to the update itself, if not get the new values
from the database and ask the user what he wants to do... or whatever

:-)

it's your call

--

Bruno Alexandre
"a Portuguese in Kbenhav, Danmark"

"philip" <ma******@gmail .comescreveu na mensagem
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
so how can i code in a queue way? my idea is, if User_A is modifying
the shared data, and User_B comes in, then how to design to let User_B
wait until User_A has finished the modification? I don't want to throw
exception anyway.

My situation is, the shared data is a counting number that if a user
performs one task, the field will be incremented.

Thanks for your help.

Bruno Alexandre ??:
when you adding the DataSource (using the wizard) click Advance (when it
askes what fields from witch table you want) and check the 3rd option...

when saving, the DataSource will compare the old values to the database
and
if they are the same, it will update thoose fields, if they are not, it
will
give you an error that you can handle or just telling the user to refresh
the view because the values were changed from the database since the last
request.

--

Bruno Alexandre
"a Portuguese in Kbenhav, Danmark"

"philip" <ma******@gmail .comescreveu na mensagem
news:11******** *************@i 3g2000cwc.googl egroups.com...
hello i am new to asp.net and sql server 2005 programming. i am
wondering how to code asp.net to prevent multiuser from modifying a
share data (on sql server) at the same time. should i do some special
coding on asp.net or sql server, or both? thanks for your help.

Aug 18 '06 #4

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

Similar topics

7
3417
by: Jack | last post by:
Hi, I am trying to test a sql statement in Access which gives me the error as stated in the heading. The sql statement is built as a part of asp login verification, where the userid and password are input in login screen. The password in the database is a number field. I am writing the dynamic sql statement as follows below. I believe I am going wrong in the password section of the code. I appreciate any help. Thanks. Regards.
4
2362
by: Pablo | last post by:
At my current job I've been tasked with maintaining a very old C++ application written largely in ANSI c++ in what I believe to be with an old DOS based Borland compiler. I'm trying to add a simple event logging component to the application. Initially I began with a simple: fstream dumpfile dumpfile.open(fname,std::ios_base::out | std::ios_base::app); //Event log occurs
9
1611
by: HelmutMunich | last post by:
Hello, I am Helmut, my database for multiuser is Frontend/Backend. The turnover file is browsed by VBA for Article numbers to be found in the article table. I use DAO 3.6 lib. The sql Statement uses the article number of the turnover file - with 29 Fields. After record 187 or so, the Article number, read from the turnover file shows only a string of ten blanks.
4
1400
by: Heath Kelly | last post by:
I need advice on correct usage of ADO.NET in an ASP.Net environment. I have an ASP.Net application that accesses data through a referenced class library. Things start to break down when multiple web clients attempt to use the application at the same time. A common error that gets returned is "sqlcommand is currently busy open, fetching". I can't understand why the users might be using the same instance of my connection, but this error...
3
15361
by: Rampa | last post by:
hello! the problem is always the same but i can't understand why it happens!! Someone can help me? FIRST QUERY GOES WELL, SECOND BREAK WITH ERROR why? Dim connessione As New SqlClient.SqlConnection("Server=SOSQLSRV01;Initial Catalog=SO_Bolle;Uid=SO_CattolicaRE;PWD=sogeda") Dim iddestinatario As Integer Dim TestoQueryCodicecodicedestinario As String = "SELECT
4
2162
by: sumansengupta | last post by:
I created an access in access2003 , its being used in multiuser environment ..based on a particular value the database is automatically closed and only i can change the value. Even after the database is closed the .ldb file exist .. Now I tried your code die.cfm from the following website http://evolt.org/node/3644 , not very sure how to use it , because with the .cfm extension its not getting executed , can you suggest how can i get it...
1
1367
by: Mike TI | last post by:
April 25, 2008 Hi all (VB Net 2008) I am populating a grid through a dataset. Now in a multiuser environment how do I show records added and updated by others. Do I have to fill the grid again.
0
2860
by: raamay | last post by:
I am new to VB.Net but since i have a good experience in VB6(having developed 2 to 3 desktop applications), i find no problem coping with the new environment at this stage. Well, i am planning to learn VB.Net and want to kickoff with development of a database application which is multiuser in nature. But as of now, i have not developed multiuser applications even in VB6. Now i want to get some advises before i move ahead. I want to know...
2
2051
by: manugm1987 | last post by:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <style type="text/css"><!-- span.cls_002{font-family:Times,serif;font-size:12px;color:rgb(0,0,0);font-weight:normal;font-style:normal} div.cls_002{font-family:Times,serif;font-size:12px;color:rgb(0,0,0);font-weight:normal;font-style:normal} span.cls_004{font-family:Times,serif;font-size:11px;color:rgb(0,0,0);font-weight:normal;font-style:normal}
0
9636
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
1
10075
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
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
8961
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 projectplanning, coding, testing, and deploymentwithout 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...
0
6727
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
5373
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...
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.