borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How to play an audio file?)Next Topic (reading text file) New Topic New Poll Post Reply
AndreaVB Forum : Database : Help for Multiuser VB Application
Poster Message
arian44
Level: Trainee

Registered: 21-12-2006
Posts: 3

icon Help for Multiuser VB Application

Hi I m new to development and I have to do my last year project so please help me out.

I want to know how VB6.0 can be used to make application for multi-user environment. so that program saved in the server is used by different  user
to perform their task. Also if one user is editing one record then the same record can't be edited by other user.While saving if suppose two user are doing the same form entry till the first user entry does not complete the second user should get waiting message,after the procedure of first user completes the second user event is performed..
Am I suppose to use ADODB for this?
Please help me out any provide me with a sample code for the same....

Front End    : VB6.0
Back End    : SQL
Report tool : Crystal Report...

How to use Crystal Report in Multi-user....
I have very short time remaining with me and have to develop a good project for this....

21-12-2006 at 07:18 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Help for Multiuser VB Application

Changing how the record is opened (locked) by the recordset would help (copied from online, but VB will give you the choices):

adLockUnspecified   -1   Unspecified type of lock. Clones inherits lock type from the original Recordset.
adLockReadOnly 1 Read-only records
adLockPessimistic 2 Pessimistic locking, record by record. The provider lock records immediately after editing
adLockOptimistic 3 Optimistic locking, record by record. The provider lock records only when calling update
adLockBatchOptimistic 4 Optimistic batch updates. Required for batch update mode


Of course you could always do something to have a lot more control over it -- add a field to the database that tells what it's status is.  That way, when a user opens  the record, you'd also update the record to contain a value to tell you whether it's opened, being edited, etc ---- but you'd still want to lock the record with like the pessimistic or optimistic way.


____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

22-12-2006 at 08:23 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
arian44
Level: Trainee

Registered: 21-12-2006
Posts: 3
icon Re: Help for Multiuser VB Application

Thanx for reply please can you send me a sample application for help....

24-12-2006 at 06:05 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Help for Multiuser VB Application

Well, there's not really an application for it, it's just one line of code.

The line where you open up the table, the lock method (that's optional) is just set.

If it's a control, there's most likely a lock method on it in the properties (but for reports, it's probably set to read only since you don't change a value in a report).

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

27-12-2006 at 08:47 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : Database : Help for Multiuser VB Application
Previous Topic (How to play an audio file?)Next Topic (reading text file) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder