Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAO and originalvalue property

Status
Not open for further replies.

techie99

Programmer
Apr 24, 2003
60
US
I have set-up my recordset as follows:

Set rst2 = da_dbs.OpenRecordset("SELECT Services_Rendered.*, CrimeVictim.*, Crime_Case.* FROM Courts INNER JOIN (CrimeVictim INNER JOIN (Crimes INNER JOIN (Crime_Case INNER JOIN Services_Rendered ON Crime_Case.Crime_Case_ID = Services_Rendered.CrimeCase_ID) ON Crimes.Crime_ID = Crime_Case.Crime) ON CrimeVictim.Crime_Victim_ID = Crime_Case.CrimeVictim_ID) ON Courts.Court_ID = Crime_Case.Court order by victim_lname ASC", dbOpenDynaset)


rst2.edit

::user edits record::

rst2.update

I have tried the following code before and after rst2.update but receive the error "3251 Operation is not supported for this type of object"

'change log routine

If rst2.Fields("Victim_Fname").OriginalValue <> rst2.Fields("Victim_Fname").Value Then MsgBox ("Victim First Name has changed") End If

When I get the error the following line of code is highlighted rst2.fields("Victim_Fname").OriginalValue

Is the originalvalue property usable with DAO and if it is, what must I change to make it work?

I just need a way of monitoring changes to the record and this seemed like an easy way of doing it if it would let me.

Thanks.
 
Hi,
Returns the value of a Field in the database that existed when the last batch update began (ODBCDirect workspaces only).

batch update
A cursor model for clients that work with cursors but don't hold locks on the server or issue updates by row. Instead, the client updates many rows that are buffered locally, and then it issues a batch update. This cursor model also allows the client to drop the connection to the server and re-establish it with the same server or even a different server.

To use batch updating in DAO 3.5, you must use an ODBCDirect workspace, the DefaultCursorDriver property must be set to dbUseClientBatchCursor at the time the Connection is opened, and the Recordset must be opened with the OpenRecordset method's locktype argument set to dbOptimisticBatch.
:)


Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top