Dataset State

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MarkusR

    Dataset State

    I want to prevent the user from closing the application if they are in
    the middle of entering data. Is there a way to detect this?

  • Bala

    #2
    Re: Dataset State

    There are a couple of events you could try to catch.
    The "FormClosin g" event for starters..

    MarkusR wrote:
    I want to prevent the user from closing the application if they are in
    the middle of entering data. Is there a way to detect this?

    Comment

    • MarkusR

      #3
      Re: Dataset State

      Thanks Bala but I know where to check but I don't know what to check.

      How do I detect the state of the table?

      -Markus

      Bala wrote:
      There are a couple of events you could try to catch.
      The "FormClosin g" event for starters..
      >
      MarkusR wrote:
      I want to prevent the user from closing the application if they are in
      the middle of entering data. Is there a way to detect this?

      Comment

      • MarkusR

        #4
        Re: Dataset State

        Is this a new concept?

        Does no one validate whether the user wants to save/cancel changes when
        the form is closing?

        -MarkusR

        MarkusR wrote:
        Thanks Bala but I know where to check but I don't know what to check.
        >
        How do I detect the state of the table?
        >
        -Markus
        >
        Bala wrote:
        There are a couple of events you could try to catch.
        The "FormClosin g" event for starters..

        MarkusR wrote:
        I want to prevent the user from closing the application if they are in
        the middle of entering data. Is there a way to detect this?

        Comment

        • Simon Tamman

          #5
          Re: Dataset State

          Depends what your datasource is.
          If it's a dataset you can call DataSet.GetChan ges() to get any changes (e.g.
          if there are no changes than the user hasn't modified any data).
          This method obviously co-incides with the functionaliy of the
          AcceptChanges() method of the dataset and row and table state (New,
          Modified, Unchanged, Deleted etc).

          HTH

          Simon

          "MarkusR" <markusrng@gmai l.comwrote in message
          news:1156188275 .905372.195790@ m79g2000cwm.goo glegroups.com.. .
          Is this a new concept?
          >
          Does no one validate whether the user wants to save/cancel changes when
          the form is closing?
          >
          -MarkusR
          >
          MarkusR wrote:
          Thanks Bala but I know where to check but I don't know what to check.

          How do I detect the state of the table?

          -Markus

          Bala wrote:
          There are a couple of events you could try to catch.
          The "FormClosin g" event for starters..
          >
          MarkusR wrote:
          I want to prevent the user from closing the application if they are
          in
          the middle of entering data. Is there a way to detect this?
          >

          Comment

          • MarkusR

            #6
            Re: Dataset State

            Thanks Simon,

            I am used to delphi where it is very event driven. BeforePost,
            AfterPost, BeforeInsert... .
            Dataset.State = dsEdit..., tabpage.changin g (so you can prevent it)...

            Got spoiled.

            C# is great though, so no need to start a delphi vs c# war. Just give
            me a chance to adjust.

            -Markus_R

            Simon Tamman wrote:
            Depends what your datasource is.
            If it's a dataset you can call DataSet.GetChan ges() to get any changes (e.g.
            if there are no changes than the user hasn't modified any data).
            This method obviously co-incides with the functionaliy of the
            AcceptChanges() method of the dataset and row and table state (New,
            Modified, Unchanged, Deleted etc).
            >
            HTH
            >
            Simon
            >
            "MarkusR" <markusrng@gmai l.comwrote in message
            news:1156188275 .905372.195790@ m79g2000cwm.goo glegroups.com.. .
            Is this a new concept?

            Does no one validate whether the user wants to save/cancel changes when
            the form is closing?

            -MarkusR

            MarkusR wrote:
            Thanks Bala but I know where to check but I don't know what to check.
            >
            How do I detect the state of the table?
            >
            -Markus
            >
            Bala wrote:
            There are a couple of events you could try to catch.
            The "FormClosin g" event for starters..

            MarkusR wrote:
            I want to prevent the user from closing the application if they are
            in
            the middle of entering data. Is there a way to detect this?

            Comment

            • Simon Tamman

              #7
              Re: Dataset State

              No worries, no need to start a Delphi-C# war, Eric Gunnarson worked on
              creating both C# and Delphi so it's almost like we're family. :)


              "MarkusR" <markusrng@gmai l.comwrote in message
              news:1156269488 .507348.47120@p 79g2000cwp.goog legroups.com...
              Thanks Simon,
              >
              I am used to delphi where it is very event driven. BeforePost,
              AfterPost, BeforeInsert... .
              Dataset.State = dsEdit..., tabpage.changin g (so you can prevent it)...
              >
              Got spoiled.
              >
              C# is great though, so no need to start a delphi vs c# war. Just give
              me a chance to adjust.
              >
              -Markus_R
              >
              Simon Tamman wrote:
              Depends what your datasource is.
              If it's a dataset you can call DataSet.GetChan ges() to get any changes
              (e.g.
              if there are no changes than the user hasn't modified any data).
              This method obviously co-incides with the functionaliy of the
              AcceptChanges() method of the dataset and row and table state (New,
              Modified, Unchanged, Deleted etc).

              HTH

              Simon

              "MarkusR" <markusrng@gmai l.comwrote in message
              news:1156188275 .905372.195790@ m79g2000cwm.goo glegroups.com.. .
              Is this a new concept?
              >
              Does no one validate whether the user wants to save/cancel changes
              when
              the form is closing?
              >
              -MarkusR
              >
              MarkusR wrote:
              Thanks Bala but I know where to check but I don't know what to
              check.

              How do I detect the state of the table?

              -Markus

              Bala wrote:
              There are a couple of events you could try to catch.
              The "FormClosin g" event for starters..
              >
              MarkusR wrote:
              I want to prevent the user from closing the application if they
              are
              in
              the middle of entering data. Is there a way to detect this?
              >
              >

              Comment

              • MarkusR

                #8
                Re: Dataset State

                I miss my numbered bookmarks as in Delphi. :(

                Simon Tamman wrote:
                No worries, no need to start a Delphi-C# war, Eric Gunnarson worked on
                creating both C# and Delphi so it's almost like we're family. :)
                >
                >
                "MarkusR" <markusrng@gmai l.comwrote in message
                news:1156269488 .507348.47120@p 79g2000cwp.goog legroups.com...
                Thanks Simon,

                I am used to delphi where it is very event driven. BeforePost,
                AfterPost, BeforeInsert... .
                Dataset.State = dsEdit..., tabpage.changin g (so you can prevent it)...

                Got spoiled.

                C# is great though, so no need to start a delphi vs c# war. Just give
                me a chance to adjust.

                -Markus_R

                Simon Tamman wrote:
                Depends what your datasource is.
                If it's a dataset you can call DataSet.GetChan ges() to get any changes
                (e.g.
                if there are no changes than the user hasn't modified any data).
                This method obviously co-incides with the functionaliy of the
                AcceptChanges() method of the dataset and row and table state (New,
                Modified, Unchanged, Deleted etc).
                >
                HTH
                >
                Simon
                >
                "MarkusR" <markusrng@gmai l.comwrote in message
                news:1156188275 .905372.195790@ m79g2000cwm.goo glegroups.com.. .
                Is this a new concept?

                Does no one validate whether the user wants to save/cancel changes
                when
                the form is closing?

                -MarkusR

                MarkusR wrote:
                Thanks Bala but I know where to check but I don't know what to
                check.
                >
                How do I detect the state of the table?
                >
                -Markus
                >
                Bala wrote:
                There are a couple of events you could try to catch.
                The "FormClosin g" event for starters..

                MarkusR wrote:
                I want to prevent the user from closing the application if they
                are
                in
                the middle of entering data. Is there a way to detect this?

                Comment

                Working...