Exactly How to Use Disconnected Recordsets in VB / SQL Server Application

From: Brad H McCollum (bmccoll1_at_midsouth.rr.com)
Date: 05/05/04


Date: 5 May 2004 14:26:09 -0700

O.k. Here's the deal. I'm writing an application for a client.
Front-end is VB 6.0, back-end is SQL Server 2000 (actually, MSDE since
there are only a couple of users of the application in their office).
Reports are present in Crystal Reports.

They're operating in the office via a 54 mbps wireless setup.

I'm a little confused about the proper usage of disconnected
recordsets. Here's the situation...

They spend the majority of their time perusing through a data entry
form that presents information on 50,000 children. Most of the time,
they're just flipping around/through various records without always
making an edit to the record. With this in mind, it's taking a bit of
time for each record to be passed back via the wireless network to the
underlying SQL Server database w/the assumption that the user *might*
have made an update to the record instead of just merely scrolling to
the record and looking at it without updating it.

What I'd like to do is be able to retrieve the entire recordset to
each local client and not make the repeated trips back and forth to
the actual database until either (1) the user closes out of the form
and *then* have all of the records sent back to the database to be
updated via UpdateBatch, or (2) periodically pass the updated records
(let's say maybe after every 15 records the user scrolls through) back
to the database as the user is using the data entry form.

The question I have deals with the # 1 scenario... updated records
aren't passed back to the SQL Server database and updated via
UpdateBatch. Let's say in the middle of a user scrolling around
through 100 children's records and making various changes to those
records, the power goes out or the PC crashes. At that point, in my
mind, there's no way to process those updates the user made to those
100 records and send them back to the database. These updates made to
the local disconnected recordset on the user's machine would seem to
be forever lost. This isn't a problem if the power never fails or the
system never crashes, but we all know that we can't bank on that
always being the case.

If anyone can provide me any insight (whether it be a code snippet,
referral to another site on the Net that goes into good detail about
how to properly use and update disconnected recordsets and minimize
the potential loss of data if something goes wrong and the edits made
to the local recordset can't be passed into the actual table in the
SQL Server database, or anything else) as to my question, I would
sincerely appreciate it.

With the situation of the wireless network, it's just taking a lot of
time to update each and every record as each user scrolls through the
various records in this 50,000+ table of records. There's a bit of a
lag there that I would like to eliminate by just working with the
local disconnected recordset while the user is editing data in the
form and then updating the edited records as the user closes out of
the form.

Thanks very much for reading my post and thanks in advance for any
information you can provide to me that might be of assistance with my
questions.

Sincerely,
Brad H. McCollum
bmccoll1@midsouth.rr.com



Relevant Pages

  • Re: SQL server question
    ... Microsoft is deprecating it even for new development, ... An Access project is an Access file that provides a direct, ... You can connect an Access project to a remote SQL Server ... a local SQL Server database, or a local installation of the SQL Server ...
    (comp.databases.ms-access)
  • Re: DataSet.GetChanges() in RowChanged(DataRowAction.Add)
    ... if the way synchronization needs to be handled changes in the ... > data stored in an SQL Server database. ... > GetChanges() call, but I feel that this workaround is not my best choice. ...
    (microsoft.public.dotnet.framework.adonet)
  • VBA Microsoft Access and SQL Server
    ... I am currently working on a project with Power Point. ... into a Microsoft SQL Server database. ... information from the Microsoft SQL Server database and re-populate a Power ...
    (microsoft.public.office.developer.vba)
  • Re: curious problem in production
    ... thank for the lesson on unique keys, but I suggest you read the question ... I am getting an exception from sql server ... >> trying to insert into the same sql server database. ...
    (microsoft.public.sqlserver.programming)
  • Re: curious problem in production
    ... thank for the lesson on unique keys, but I suggest you read the question ... I am getting an exception from sql server ... >> trying to insert into the same sql server database. ...
    (microsoft.public.dotnet.framework.adonet)