Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

multi user programming

hi,
I am working on project where Database is placed in server.Database is in Access.i am using adodb.Now my requirement is,multiple user on different machine can add different records to same table.
i am using code like

recordset.source=query
recordset.CursorLocation = adUseClient
recordset.CursorType = adOpenDynamic
recordset.locktype=adLockOptimistic
recordset.ActiveConnection = Conn
recordset.Open

now what changes should i make so my purpose can solved.Please help and guide me urgently.
Ganesh :)

Comments

  • aatkbdaatkbd Member Posts: 42
    : hi,
    : I am working on project where Database is placed in server.Database is in Access.i am using adodb.Now my requirement is,multiple user on different machine can add different records to same table.
    : i am using code like
    :
    : recordset.source=query
    : recordset.CursorLocation = adUseClient
    : recordset.CursorType = adOpenDynamic
    : recordset.locktype=adLockOptimistic
    : recordset.ActiveConnection = Conn
    : recordset.Open
    :
    : now what changes should i make so my purpose can solved.Please help and guide me urgently.
    : Ganesh :)
    :

    MultiUser access to the database is set through the connection string and database settings, not the recordset type or settings. The recordset will inherit the locking schema from the database settings or workspace.

    While creating this app you have to weight the risk of two people editing the same record inside a 10 minute time period. If that is highly probable then you have to check whether the record has been update since the client last pulled the data and before you allow them to update it.

    This is the responablity of the programmer not the database and you will have to write some code to inforce proper editing rules. How you do that is dependent on whether this is a web app or client app.

    Let me know which it is and I might be able to help you further.
  • jlegjleg Member Posts: 237
    [b][red]This message was edited by jleg at 2005-10-20 19:59:13[/red][/b][hr]
    : hi,
    : I am working on project where Database is placed in server.Database is in Access.i am using adodb.Now my requirement is,multiple user on different machine can add different records to same table.
    : i am using code like
    :
    : recordset.source=query
    : recordset.CursorLocation = adUseClient
    : recordset.CursorType = adOpenDynamic
    : recordset.locktype=adLockOptimistic
    : recordset.ActiveConnection = Conn
    : recordset.Open
    :
    : now what changes should i make so my purpose can solved.Please help and guide me urgently.
    : Ganesh :)
    :
    You may wish to use a server side cursor adUseServer. Client side cursors will bring the recordset down to the client end and other clients will not be aware of changes or additions etc. The cursor Type and locktype will be up to you dependent on what you want to occur. I would suggest however you look at the limitations when using serverside cursors. I think you may have to resort to Keyset cursor type.

    Optimistic locks will only find issues when they actually try to update the record. Not when an attempt is made to access the record. Pessimistic locks works the on access of the record.

    Hope this helps


    John ;-)
  • zaib_awanzaib_awan Member Posts: 9
    : [b][red]This message was edited by jleg at 2005-10-20 19:59:13[/red][/b][hr]
    : : hi,
    : : I am working on project where Database is placed in server.Database is in Access.i am using adodb.Now my requirement is,multiple user on different machine can add different records to same table.
    : : i am using code like
    : :
    : : recordset.source=query
    : : recordset.CursorLocation = adUseClient
    : : recordset.CursorType = adOpenDynamic
    : : recordset.locktype=adLockOptimistic
    : : recordset.ActiveConnection = Conn
    : : recordset.Open
    : :
    : : now what changes should i make so my purpose can solved.Please help and guide me urgently.
    : : Ganesh :)
    : :
    : You may wish to use a server side cursor adUseServer. Client side cursors will bring the recordset down to the client end and other clients will not be aware of changes or additions etc. The cursor Type and locktype will be up to you dependent on what you want to occur. I would suggest however you look at the limitations when using serverside cursors. I think you may have to resort to Keyset cursor type.
    :
    : Optimistic locks will only find issues when they actually try to update the record. Not when an attempt is made to access the record. Pessimistic locks works the on access of the record.
    :
    : Hope this helps
    :
    :
    : John ;-)
    :



    Use This
    recordset.CursorType = adOpenKeyset
    Instead of This
    recordset.CursorType = adOpenDynamic

Sign In or Register to comment.