Re: Code help (ADDITIONAL)

From: pokdbz (pokdbz_at_discussions.microsoft.com)
Date: 12/15/04


Date: Wed, 15 Dec 2004 12:05:04 -0800

Thanks for the help.
What does dirty do anyway I am confused about this term and what it does?

Also what is the difference between commit and rollback

"Rick Brandt" wrote:

> You are also never committing your transaction so your queries are doing
> nothing. Whenever you have a BeginTransaction somewhere later you need
> either a Rollback or a Commit.
>
> "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
> news:32bgm1F3kltlhU1@individual.net...
> > "pokdbz" <pokdbz@discussions.microsoft.com> wrote in message
> > news:D415E26A-E4F9-4E66-88ED-F3033047B9B5@microsoft.com...
> > > I have this piece of code below and when I run it it says that
> SaveRecord
> > is
> > > not available. Does anyone have a clue why.
> > >
> > >
> > > Private Sub cmdSave_Click()
> > > On Error GoTo Err_cmdSave_Click
> > >
> > > save = True
> > >
> > > Dim sessionDate As Date
> > >
> > > Dim qdfDone As DAO.QueryDef
> > > Dim qdfStudyIdSSN As DAO.QueryDef
> > > Dim qdfNextDate As DAO.QueryDef
> > > Dim qdfRemindDate As DAO.QueryDef
> > >
> > > 'If Check1 = "Yes" Then
> > > 'Since we are adding to two tables, lets make it a transaction
> > > DBEngine.BeginTrans
> > >
> > > Set qdfDone = CurrentDb.QueryDefs("QueryAddDoneSession")
> > > qdfDone.Parameters("newId") = InterviewID
> > > qdfDone.Parameters("newVisit") = 1
> > > qdfDone.Execute
> > >
> > >
> > > Set qdfNextDate = CurrentDb.QueryDefs("QueryAddStatusNextDate")
> > > qdfNextDate.Parameters("newId") = InterviewID
> > > qdfNextDate.Parameters("newVisit") = 2 'schedule next
> interview
> > > qdfNextDate.Parameters("newInterviewDate") = sessionDate + 350
> > > qdfNextDate.Execute
> > >
> > > qdfNextDate.Close
> > >
> > > Set qdfRemindDate =
> > > CurrentDb.QueryDefs("QueryAddStatusReminderDate")
> > > qdfRemindDate.Parameters("newId") = InterviewID
> > > qdfRemindDate.Parameters("newVisit") = 1
> > > qdfRemindDate.Parameters("newCallDate") = sessionDate + 290
> > > qdfRemindDate.Execute
> > >
> > > qdfRemindDate.Close
> > >
> > >
> > >
> > > DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
> > acMenuVer70
> > > save = False
> > > Call InterviewSession.CloseSession
> > > 'End If
> > >
> > > Form.Requery
> > >
> > > Exit_cmdSave_Click:
> > > Exit Sub
> > >
> > > Err_cmdSave_Click:
> > > MsgBox Err.Description
> > > Resume Exit_cmdSave_Click
> > >
> > > End Sub
> >
> > If the form that this code is running behind hasn't been "dirtied" then
> > there is nothing to save. Whatever changes you are processing with your
> > queries have nothing to do with the record currently on the form.
> >
> > --
> > I don't check the Email account attached
> > to this message. Send instead to...
> > RBrandt at Hunter dot com
> >
> >
>
>
>



Relevant Pages

  • Re: transaction demarction
    ... do they mark something? ... a banking transaction that moves money from one bank account ... that involves database access and ends when you either COMMIT or ROLLBACK. ...
    (comp.lang.java.programmer)
  • Re: transaction demarction
    ... a banking transaction that moves money from one bank account ... a "demarcation" between the two units of work. ... that involves database access and ends when you either COMMIT or ROLLBACK. ...
    (comp.lang.java.programmer)
  • Re: transaction demarction
    ... do they mark something? ... a "demarcation" between the two units of work. ... the COMMIT or ROLLBACK statement marks the end of the unit of work so ...
    (comp.lang.java.programmer)
  • Re: Code help (ADDITIONAL)
    ... "pokdbz" wrote in message ... > Ok i get Dirty now. ... Also the rollback and commit i get. ...
    (microsoft.public.access.formscoding)
  • Hein is in the house :-) (was Re: Recommended HP COBOL way to exit a paragraph or perform early?
    ... commit or rollback. ... Committed but RMS just keeps getting better and better so is Repeatable Read ... node) the RMS Exec Mode Rundown handler will Rollback any outstanding ... transactions that a process may have if/when that particular process gets ...
    (comp.os.vms)