Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi-client application...cursor?

Status
Not open for further replies.

wawanz

Programmer
Aug 29, 2002
62
ID
Hi guys...I'm developing an application with VB6 and SQL Server 2000. I have thousands of records that would be updated simultaneously by multi-users. My goal is: if user A points to a record(I use datagrid), and user B is doing something with that particular record, I want a msgbox saying "Record is being accessed by user B!"...and so user A would select another record to update. Any suggestions on what to do?(cursorlocation,cursortype,locktype,etc). Thanks a lot guys!
 
I think if you set the rs.lockedits = TRUE, then VB automatically throws this error message. Though I donot have any idea as to whether you would be able to show the user name.

Regds
Engi
 
thanks engineer2100 I'll try that...and yes, I didn't think I could show the user name either... :) it would be great if it could, right?
 
mr. engineer2100 lockedits is not a property of ADODC/ADODB, which I'm using...it's a property of DAO...Thanks anyway
 
I think you'll have to write your own business component for doing what you want. An extra layer between ADO and your UI can do what you want.

Greetings,
Rick
 
set the locktype to adLockPessimistic, cursorlocation to adUseServer
This will cause alot of overhead.
I do not recommend doing this anyways, from a user's viewpoint....

I do not really understand why someone would want to do this anyways....
 
I still haven't found the answer for this problem...What I'm trying to achieve is: when user A selects a record in his datagrid, an empty "UserName" field on that record will be automatically filled with "A"...and user B's datagrid is also automatically updated, where that particular record would have "A" in its "UserName" field...This IS common and possible, right guys? I thought a server & dynamic cursor can do that,BUT it turned out I can't use a server & dynamic cursor with a datagrid. Help, anyone? I use SQL Server 7.0 and VB 6.0, thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top