473,394 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

MS Access 97 - Forcing an Update

Environment: MS Access 97

Problem:
Trying to force a record to update using the recordset.Update
property. What syntax do I need to force a record to be updated? I
have searched the newsgroups and web and haven't found a solution that
works.

Thanks!

The following is the syntax from the help file:
recordset.Update (type, force )

The Update method syntax has the following parts.

Recordset: An object variable that represents an open, updatable
Recordset object.

Type: Optional. A constant indicating the type of update, as specified
in Settings (ODBCDirect workspaces only).

Force: Optional. A Boolean value indicating whether or not to force
the changes into the database, regardless of whether the underlying
data has been changed by another user since the AddNew, Delete, or
Edit call. If True, the changes are forced and changes made by other
users are simply overwritten. If False (default), changes made by
another user while the update is pending will cause the update to fail
for those changes that are in conflict. No error occurs, but the
BatchCollisionCount and BatchCollisions properties will indicate the
number of conflicts and the rows affected by conflicts, respectively
(ODBCDirect workspaces only).
Nov 12 '05 #1
1 7283
The use of recordset.Update refers to when you create a reocrdset in code,
and thus need to do a update.

The above concept has nothing to do with a form bound to a table, as then
you are not manipulating the data via reocrdsets, but are just using forms.

It is not all clear in which context you are referring to updating a record.
(as there is a zillion ways to update records).

If you want in code to force a disk write for a form that is bound to a
table, and not talking about a reocrdset, then you can use:
me.refresh

In the forms code. Since I always restrict my forms to generally one record,
then out of convenience, I use the above syntax. However, many of the more
experienced regulars here do suggest to use:

if me.Dirty = True then
me.Dirty = False
end if

The dirty property is set = true if data has been modified. If you force
dirty = false, then the only thing ms-access can do is to first force a disk
write. Me.Refresh also works, but can cause other records to be loaded
again. Either of the above will force the current record in a bound form to
disk.

If you are talking about recordsets, and code, then your example of using
recordset.update is correct.
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
No************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: rbt | last post by:
I'm using the standard NTFS file system. The only time the access time is updated is when the file is modified or saved (with no changes). What's up with that? Shouldn't a read/view update the...
0
by: Robert Wille | last post by:
I have a number of very common queries that the optimizer plans a very inefficient plan for. I am using postgres 7.2.3. I vacuum hourly. I'm wonderingwhat I can do to make the queries faster. Here...
1
by: Robert Wille | last post by:
I have a number of very common queries that the optimizer plans a very inefficient plan for. I am using postgres 7.2.3. I vacuum hourly. I'm wonderingwhat I can do to make the queries faster. Here...
13
by: Noesis Strategy | last post by:
When I ordered my new laptop, Sony didn't offer Access 2003 in its bundles. Recently, I have begun to design Access databases using an copy of Access 2002 from my previous laptop. It works fine,...
1
by: JohnC | last post by:
I have this exact same scenario. It is new and seems to be related to when we installed Adobe 7.0 Standard/Professional. We have an MDB on a LAN file server. Using Access 2K and Windows 2K. ...
6
by: Plamen Doykov | last post by:
Hi all I have converted a simple project from ASP.NET 1 to 2.0 with the latest prerelease of Visual Studio 2005. The problem is I can't access internal members from the code behind. It gives:...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
12
by: Hugh Welford | last post by:
hi Running an asp site on win/IIs/MSACCESS with a database reaching 45 meg. Responses seem a little slow. Could anyone provide a checklist of things to look at to optimise data access on this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.