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

Multitier app

Hi,
I am new to multitier app development. I am working on a windows app
that will have business layer and data access layer components. When users
log into the client app, it connects to the business layer to get a list of
records that it then uses to populate a datagrid. The business layer
component in turn gets these records from Sql Server database using the data
access layer.
When a user highlight any record displayed in the datagrid, I need to
lock that record for editing and stop other users from editing that record.
My question is how do I flag that record to indicate other users that this
record is being edited by another user. I was first thinking of having a
Flag field in the underlying table and update the Flag field in the table
everytime the user highlights a row. But then I thought this would involve
too many unnecessary read/write operations on the table. So I am thinking of
maintaining the list of rows in the business layer and flag them only on the
business layer without having to flag them in the Sql Server table.
Everytime the user highlights a row it will check the Flag value of that
record on the business layer and if it is not being edited by any other user
it will lock that record and allow the user to edit it.

Is this possible? Do I need to use .Net Remoting for this? Are there any
better options?

Thanks in advance.
Mar 28 '06 #1
2 1429
Are you sure "locking" is the right solution?

You may want to institute a timestamp on the record.
When you query it, grab the timestamp. When you
save it, check to see if the timestamp on the record
is newer than the one you have. If so, then display
the updated info and who updated it, and then
ask the user to overwrite it again.

Record locking can create some technical issues
for you and is often more problematic for
the rare instances where this conflict actually
occurs.

--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp

"helpful sql" <no****@stopspam.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
Hi,
I am new to multitier app development. I am working on a windows app
that will have business layer and data access layer components. When users
log into the client app, it connects to the business layer to get a list
of records that it then uses to populate a datagrid. The business layer
component in turn gets these records from Sql Server database using the
data access layer.
When a user highlight any record displayed in the datagrid, I need to
lock that record for editing and stop other users from editing that
record. My question is how do I flag that record to indicate other users
that this record is being edited by another user. I was first thinking of
having a Flag field in the underlying table and update the Flag field in
the table everytime the user highlights a row. But then I thought this
would involve too many unnecessary read/write operations on the table. So
I am thinking of maintaining the list of rows in the business layer and
flag them only on the business layer without having to flag them in the
Sql Server table. Everytime the user highlights a row it will check the
Flag value of that record on the business layer and if it is not being
edited by any other user it will lock that record and allow the user to
edit it.

Is this possible? Do I need to use .Net Remoting for this? Are there
any better options?

Thanks in advance.

Mar 29 '06 #2
Thanks for your reply.

The records are scheduled call activity records and we want to show the same
list of calls to many users and make sure that no two users are calling the
same person.

"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:OJ**************@TK2MSFTNGP09.phx.gbl...
Are you sure "locking" is the right solution?

You may want to institute a timestamp on the record.
When you query it, grab the timestamp. When you
save it, check to see if the timestamp on the record
is newer than the one you have. If so, then display
the updated info and who updated it, and then
ask the user to overwrite it again.

Record locking can create some technical issues
for you and is often more problematic for
the rare instances where this conflict actually
occurs.

--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp

"helpful sql" <no****@stopspam.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
Hi,
I am new to multitier app development. I am working on a windows app
that will have business layer and data access layer components. When
users log into the client app, it connects to the business layer to get a
list of records that it then uses to populate a datagrid. The business
layer component in turn gets these records from Sql Server database using
the data access layer.
When a user highlight any record displayed in the datagrid, I need to
lock that record for editing and stop other users from editing that
record. My question is how do I flag that record to indicate other users
that this record is being edited by another user. I was first thinking of
having a Flag field in the underlying table and update the Flag field in
the table everytime the user highlights a row. But then I thought this
would involve too many unnecessary read/write operations on the table. So
I am thinking of maintaining the list of rows in the business layer and
flag them only on the business layer without having to flag them in the
Sql Server table. Everytime the user highlights a row it will check the
Flag value of that record on the business layer and if it is not being
edited by any other user it will lock that record and allow the user to
edit it.

Is this possible? Do I need to use .Net Remoting for this? Are there
any better options?

Thanks in advance.


Mar 29 '06 #3

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

Similar topics

0
by: Joan MacEachern | last post by:
This paper presents an availability analysis for multitier, Java(tm) and Web-based application deployments running on the Sun(tm) ONE Application Server 7, Enterprise Edition software. The...
1
by: Chuck Spears | last post by:
Does python have a component model? I'm currently using delphi and C++ builder to build windows apps and I am looking to also support linux. They seem to be waffling on their linux support so I...
4
by: Ravi | last post by:
Hi, I have a (stupid) question on why web service class needs an instance. Everybody knows its stateless then why cant it can be standardized that all methos in web service class should be static....
6
by: Jerry Orr | last post by:
We are trying to determine the easiest (and cheapest) way to get connections for about 50 Win2K workstations on our LAN to DB2 on a z/OS server. We could install DB2 Connect Personal Edition on...
14
by: Joe Fallon | last post by:
I am trying to build a Data Access Layer for a SQL Server back end. My class has a number of methods in it. The constructor takes a connection string. I currently have to instantiate an object...
11
by: ljlevend2 | last post by:
Does anybody know if there are plans to add improved support for multi-core processors in VB? It is easy to launch a process on a new thread in VB, but in a real world application it can take a...
15
by: dn | last post by:
I'm starting an n-tier application with an ASP.NET 2.0 presentation layer, a business layer, a data access layer, and a SQL Server 2005 database, and I have a question. In the business and data...
4
by: Martyn Fewtrell | last post by:
Hi there I am just canvassing some opinions so feel free to add yours. I mainly work with VB.Net on dynamic websites driven by Access and have more recently been trying to introduce Business...
3
by: helpful sql | last post by:
Hi, I am new to multitier app development. I am working on a windows app that will have business layer and data access layer components. When users log into the client app, it connects to 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
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...
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
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...

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.