disjoint modifiable recordset?

R

rmanchu

i'm trying to do the following;

load a form with records, such that the recordset is disconnected from
the database. i can do this (open connection - then recordset and
assign it to form all via vb).

then i want the user to be able to modify records or add records which
will be captured via form_events and use a separate Command object to
update or insert records. i'm unable to do this part. please haaalp :(

y i need to apply such an approach is; lots of users will use the same
table - ie if one user opens a dynaset, the others cannot open the
table. i'm using a SQLServer with an Access2003 frontend

please help
riyaz
 
M

MacDermott

Your approach strikes me as problematic -
imagine 2 (or more!) users modifying the table.
One user changes the data in a record - your code writes his changes
back to the SQL Server table, but the other user doesn't see them, because
his recordset is detached. Now the second user modifies the same record.
Your code writes his changes back to the SQL Server table, overwriting the
first user's changes. The first user is not notified of this.
I'm not an expert at SQL Server, but it's my understanding that SQL
Server is a robust database, which can accommodate a large number of
simultaneous users. So I would question your assertion "if one user opens a
dynaset, the others cannot open the table". Perhaps you should go learn a
bit more about configuring SQL Server.

BTW, while you can bind an Access form to a disconnected recordset, that
form is then not updatable. The only way I know of to implement your
approach would be to use a completely unbound form and write custom
navigation buttons.
 
R

rmanchu

http://groups.google.com/group/comp...access+form+recordset&rnum=2#6bd42d761a4f06fe

it can be done - as per above link

also from same post
.CursorLocation = adUseClient
.LockType = adLockOptimistic
the above does a good job of it, even thought the recordset is
connected. i'll stick to this method.
in so far as data inconsistency is concerned, it will be very very
minimal for my application - so it won't be a problem. :)

is it possible to get this behavior from access forms direct???

thanx
riyaz
 
M

MacDermott

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top