Dear friends,
Fine and hope the same with you all.
I am here with one more new problem which I might be able to solve with your suggestions as we have did earlier.
Problem:
I have a requirement from my client where I need to give update or edit privileges on a particular row located in a table of remote SQL server database using C#,asp.net windows application.
(or)[the other side of my question]
I need to develop a C#, asp.net windows application that will restrict two users (Client side where no database is available) from accessing the same row of a table in a remote SQL server database at the same time.

Eg: ( for explaining the question in a better way)

A Hotel 'Krishna International' is having booking centers to book rooms in this hotel from various locations. All the booking centers will be in a network and from two different locations they should not be able to book the same room at a time.

Hope I am clear with the explanation of my problem. I request you all to think of this problem and suggest me how I can solve this problem. Your directions will be very helpful to solve this problem.
This time I will keep the coding part updated frequently so that it will be helpful to me and all of you to help me in solving this problem.

Hope to get back from you at the earliest.
Thanking you in anticipation,
Vamsi K Gummadi.

Look up how transactions work. That'll keep you from giving the same room out to two different parties. :icon_wink:

Hello,
Thank you for the reply and I am looking into the solution you suggested for.

In the problem I am trying to explain.
The database will be on a system 'C' and there are two clients 'A' and 'B' who are connected to 'C' through network.

A-----------------C------------------B
client database client

The client 'A' and 'B' will not have any database with them. Both of them must be able to view the database at the same time but if they try to edit (' book the room') only one should be allowed to perform the transaction at a time.
i.e., I need to restrict the number of users accessing the same row of a table in SQL database with edit and update previleges at the same time to 'One' using C# windows application. I don't have rights on the database so I need to develop this functionality as a client side windows application. I have complete previleges on all the sytems being used as clients.

Hope I am clear with my explanation.
Waiting for your suggestions,
thanking you,
Vamsi K Gummadi.

Hi,

Additional clarification for ' I don't have rights on the database' as and when user A or user B preforms a funtion like button press the room needs to be booked but only to one either A or B (snapshot).
Bye,
Vamsi K Gummadi

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.