Programming on SQL Server 7 with VB(using ADO)
On a multiuser environment it is known that the data in a recordset has
to be refreshed for any user whenever he wants an uptodate data, for this
reason I have implemented the program in a way that the recordset for any
user will be refreshed if he explicitly asked for an uptodate data from the
database.
My implementation works fine when I use a recordset to open a table
constructed without a primary key (from the SQL Server 7 database) just like
I told you above the user explicitly asks for an uptodate data and he will
be given the uptodate data(the recordset will be refreshed) but if he does
not ask explicitly for an uptodate data there will not be change on the recordset
that he is currently viewing.
The problem pops up when I use a recordset to open a table constructed
with a primary key(from the SQL Server 7 database). Like I told you above
this is a multiuser enviroment program so two users, userA and userB, might
be viewing the same table from the same database(from the SQL Server 7 database).
When userA modifies the database table(like deleting/editing a record) the
changes made by userA will be viewed by userB without userB explicitly asking
for uptodate data(refreshment) its like the database server refreshes the
recordset of userB without userB knowing, which was not intended to do.
I hope this one makes it more clear, hope to get the response soon.
thank you,
Addisu
Re: Programming on SQL Server 7 with VB(using ADO)
"Addisu Mulat" <addisumulat@hotmail.com> wrote:
>
> On a multiuser environment it is known that the data in a recordset
has
>to be refreshed for any user whenever he wants an uptodate data, for this
>reason I have implemented the program in a way that the recordset for any
>user will be refreshed if he explicitly asked for an uptodate data from
the
>database.
> My implementation works fine when I use a recordset to open a table
>constructed without a primary key (from the SQL Server 7 database) just
like
>I told you above the user explicitly asks for an uptodate data and he will
>be given the uptodate data(the recordset will be refreshed) but if he does
>not ask explicitly for an uptodate data there will not be change on the
recordset
>that he is currently viewing.
> The problem pops up when I use a recordset to open a table constructed
>with a primary key(from the SQL Server 7 database). Like I told you above
>this is a multiuser enviroment program so two users, userA and userB, might
>be viewing the same table from the same database(from the SQL Server 7 database).
>When userA modifies the database table(like deleting/editing a record) the
>changes made by userA will be viewed by userB without userB explicitly asking
>for uptodate data(refreshment) its like the database server refreshes the
>recordset of userB without userB knowing, which was not intended to do.
>
>I hope this one makes it more clear, hope to get the response soon.
>
>thank you,
>Addisu
There is a possibility that you use a
.CursorType=adOpenDynamic
and this is from Microsoft's helpfile:
Dynamic cursor. Additions, changes, and deletions by other users are visible,
and all types of movement through the recordset are allowed, except for bookmarks
if the provider doesn't support them.
Try another .CursorType = adOpenStatic
Static cursor. A static copy of a set of records that you can use to find
data or generate reports. Additions, changes, or deletions by other users
are not visible.
Morten