PC Review


Reply
Thread Tools Rate Thread

ADO Record Set in Multi User Mode

 
 
Prabhat
Guest
Posts: n/a
 
      6th Apr 2004
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


 
Reply With Quote
 
 
 
 
Rich
Guest
Posts: n/a
 
      6th Apr 2004
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

>-----Original Message-----
>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
>
>
>.
>

 
Reply With Quote
 
Prabhat
Guest
Posts: n/a
 
      7th Apr 2004
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


"Rich" <(E-Mail Removed)> wrote in message
news:191b701c41c04$de277030$(E-Mail Removed)...
> 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
>
> >-----Original Message-----
> >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
> >
> >
> >.
> >



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      7th Apr 2004
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


 
Reply With Quote
 
Prabhat
Guest
Posts: n/a
 
      8th Apr 2004
Hi Friends!

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

Any Suggestions, Website Link, or Small Example?

Thanks
Prabhat

"Prabhat" <(E-Mail Removed)> wrote in message
news:uRItwo$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
record Locking multi user Luciano Microsoft Access Form Coding 0 31st May 2010 07:32 PM
Access mdb in multi user mode John Microsoft Access 1 3rd Mar 2007 10:53 AM
MS Access in multi-user mode.. =?Utf-8?B?aW52ZXN0aWdhdG9yMzcwNw==?= Microsoft Access 5 11th Feb 2005 01:23 PM
Record Locking (Multi User) Neil Mansell Microsoft Access Forms 2 22nd Aug 2004 01:39 AM
OE6 in single-user mode on multi-user OS Danko Microsoft Outlook Installation 1 13th Nov 2003 09:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:36 AM.