Hello everybody,
I've got a bit of a situation that I could use some guidance with if
possible. I work for an auditing firm where my users audit electronic
shipping data for customers to see if they've been overcharged for
shipments by truck and rail carriers.
99.9% of the time, one of our auditors needs to see all data sent by a
customer in datasheet view so that they can sort records in many
different ways looking for duplication of bill payments over a
specific time period. This might involve as little as 100 records for
a small client or 200,000 or more records for a larger client. I know
this sounds ludicrous to have that many records open at one time in a
form, but you would not believe what our auditors have found at times
and thus have recovered many thousands of dollars for our clients just
because they can see the whole picture of charges in one screen full
of data. The nature of our business basically violates every database
rule there is about only retrieving small datasets and disconnecting
the recordset.
The problem I'm having at this using Access 97, 2000 or 2003 as the
frontend and SQL Server 2000 as the backend...record locks that
escalate into full table locks / deadlocks if a user doesn't goto the
end of a recordset with a query/form open so that Access releases the
locks. Sorting of a recordset in a form causes entire the entire
query to be re-run thus pulling the entire recordset back over the
network to the machine and then creating major locking problems when
multiple users are sorting and updating rows with data to print
claims.
Yes, I've been using bound forms for a very long time and have enjoyed
the freedom of not having to marshal connections and record changes,
but that freedom is coming to an end I believe, according to what you
guys are going to say. I can see the writing on the wall about this,
but need some guidance of how to make my app perform better.
I have tried the following to fix the record locking and performance
problems using Access 2003:
1. Using an .MDB, create a client-side ADO recordset from a query,
disconnecting the recordset from the database and then assigning
the .Recordset property of the form to this ADO recordset.
Performance was horrible even with just 10,000 records. There were
other concurrency issues to that I never got around also when trying
to update the ADO recordset and flushing the data back to the
database.
2. Tried using an ADP with stored procedures but the OLEDB driver
just goes nuts and eats all of the RAM in the machine when working
with large recordsets. I don't think an ADP will be the way I need to
go because the users change queries all the time looking for anomolies
in the data to file a claim against. I know that the auditors don't
want to learn SQL to change stored procs!
I've thought of trying the following, what do you all think?
1. Create a local table that contains all of the fields that the
auditor will need to do their thing.
2. Execute an INSERT into this local table from the SQL server with
an append query.
3. Base the auditing form on this local table so that the performance
is good and write changes back to the database with a stored proc call
passing the fields that were changed.
If there's some other way to do this with some sort of disconnected
recordset and binding that recordset to a form, I'm ALL EARS!
My flame suit is on for using bound forms, but they've worked like a
charm in the past before moving up to SQL server because we needed
much more database space than an Access .MDB could hold!
Thanks,
Jim