ADO Record Set in Multi User Mode

  • Thread starter Thread starter Prabhat
  • Start date Start date
P

Prabhat

Hi All,

Can any body help me to use the ADO Recordset in Multiuser Environment for
SQL Server DB?

How Can I Restrict User 2 to Open the Same Row which is Opened By User 1 and
I will Display Message that "This Record is being opened for edit"?

Suppose User 1 Open a ROW using SQL "Select * from EMP Where EMPID = 1001".
So Now User 2 Should not be able to use the 1001 Employee. If He Try to open
that then he should get the Above message. But he should be able to open any
other records. And Also When the User 1 will Say "Update" or "Cancel" then
the user 2 should be able to open 1001.

I am New to Multiuser programming in ADO. Please Guide me.

Thanks
Prabhat
 
Hi Prabhat,

Just a thought, but perhaps you could add an additional
field to the data table - call it Edit (or something like
that). This field would be Null by default. When a user
accesses the record (from an Edit button) you would
automatically update that record with some character or
number so that it is not null. If another user tries to
access this record (also from an edit button) it would
first check the edit field. If the field is not null then
give the message that it is being edited. When the first
user is finished editing the record you automatically set
the Edit field back to Null. Maybe there is something
easier, but I am kind of new to dotnet also.

Rich
 
Thanks Rich,

I know that we can do like that. But that has a potential problem. Like if
suppose the application will not be able to release that FLAG then it will
not alow any user to open that. We need again a interface to clear that all.

So I am searching for something in ADO Recordset.

Can Any One HELP Me out of that?

Thanks
Prabhat
 
Hi Prabhat,

When you want information about the Ado recordset in multiuser mode I think
you can better ask that in a classic VB newsgroup.

microsoft.public.vb
or
microsoft.data.ado (is a small but active newsgroup)

In dotnet is Adonet and the Dataset more normal used.

I do not think that a lot active in the dotnet newsgroups will take a lot of
time with looking again to those typical ADO settings, the rollbacks or/and
whatever needed for this.

Just my thought,

Cor
 
Hi Friends!

Can We do this type of multiuser handling in ADO.NET ?

Any Suggestions, Website Link, or Small Example?

Thanks
Prabhat
 
Back
Top