Access 2007 & Concurrency


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Thanks for the help Trent & Edhy Rijo. Much appreciated.

No problem Smile

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
So far with the help of SF I am doing pretty good with this project and I am sure many things will have to be re-written after the training , but for now, just trying to keep things put and getting ready for the training.

Well, I can already tell you that you will end up on top of things and be successful with your application.  You have an open mind and are willing to learn and adopt new things and techniques.  This is how you get on the top of the pile!

We live in a continuously changing business and we too are always learning better and more efficient ways to do things...so we refactor our code very often as well.

Crones
Crones
StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)
Group: Forum Members
Posts: 35, Visits: 345
Thanks for the help Trent & Edhy Rijo. Much appreciated.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K

Regardless of the database, row versioning is always the best method as the query is far less complicated than when using all fields.  This is actually a section that we cover during training and show the massive differences between using row versioning and any other type of checking.

Trent,

Thanks for the info.  I am sure I'll have a lot fun in the training with all the material to cover.  So far with the help of SF I am doing pretty good with this project and I am sure many things will have to be re-written after the training BigGrin, but for now, just trying to keep things put Tongue and getting ready for the training.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
One question, will the Version field be incremented automatically by SF or do we have to update this field in every change of the record to trigger the concurrency rule?

It will be auto-managed just as the SQL Server and others do.

Also what would be the reccomended concurrency rule for MS-SQL2005?

Regardless of the database, row versioning is always the best method as the query is far less complicated than when using all fields.  This is actually a section that we cover during training and show the massive differences between using row versioning and any other type of checking.

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (04/03/2008)
The only way that the concurrency will work with Access is by using a row version field.  The Optimistic all fields and timestamp options will not work with Access.  If you create a row version field and then set the CRUD settings on the BO, it will work.  I updated and posted the sample that you had started.  When you create the version field, be sure to have all records update with a 0 for teh default value or it will not work.  The reason is when you add the new version field it will basically be empty...so it will get overlooked.

Hi Trent,

One question, will the Version field be incremented automatically by SF or do we have to update this field in every change of the record to trigger the concurrency rule?

Also what would be the reccomended concurrency rule for MS-SQL2005?

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The only way that the concurrency will work with Access is by using a row version field.  The Optimistic all fields and timestamp options will not work with Access.  If you create a row version field and then set the CRUD settings on the BO, it will work.  I updated and posted the sample that you had started.  When you create the version field, be sure to have all records update with a 0 for teh default value or it will not work.  The reason is when you add the new version field it will basically be empty...so it will get overlooked.
Attachments
AccessTest.zip (106 views, 212.00 KB)
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Ok, I am able to duplicate your results.  Have you tried with OptimisticTimeStamp or OptimisticRowVersion?

My guess is that somehow Access is either not sending the event or SF is not catching it.

Edhy Rijo

Crones
Crones
StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)
Group: Forum Members
Posts: 35, Visits: 345
The steps to reproduce what SHOULD cause an concurrency exception is to start the project, and after the form loads and displays the values, open the database with Access and change the values of the table and save the changes. Then click the save button on the app.



When I do the same steps using SQLExpress, I get the concurrency exception which is what I need to happen.



Thanks for checking it out.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Crones,

I willing to test your sample project, please post steps to do the same test you are doing.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search