<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Glad to hear it solved the problem :)<br>
    <pre class="moz-signature" cols="72">
</pre>
    <br>
    On 16/05/2012 11:43 a.m., Eric A wrote:
    <blockquote cite="mid:SNT128-W604EEED0AB357D11763F409F1B0@phx.gbl"
      type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
      <div dir="ltr">
        Thanks for the response, Rob.<br>
        <br>
        Interestingly, I have just changed from using the TADOTable
        objects for adding/deleting/editing the database table data and
        have instead now implemented those functions in TADOQuery
        objects.&nbsp; The problem appears to have been solved.&nbsp; I just
        follow the TADOQuery methods with either an ADOQuery.Requery([])
        method invoation or the sequence of&nbsp; ADOQuery.Close then
        ADOQuery.Open&nbsp; (either has the the desired result).<br>
        <br>
        In this case its a pretty straightforward small application with
        only two distinct tables, i.e. there are no Master/Detail
        relationships to worry about.<br>
        <br>
        Normally, for more complex databases (eg with relationships
        between tables) I would use the SQL approach as you have
        intimated.<br>
        <br>
        Eric<br>
        <br>
        <br>
        <br>
        <div>
          <hr id="stopSpelling">Date: Wed, 16 May 2012 09:49:30 +1200<br>
          From: <a class="moz-txt-link-abbreviated" href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a><br>
          To: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
          Subject: Re: [DUG] MSSQL DBGrid Refresh<br>
          <br>
          Hi<br>
          <br>
          I don't use the ADO components much but it sounds like a
          caching issue.&nbsp; I would definately NOT use table methods and
          do it all from SQL.&nbsp; Its much cleaner that way and you can see
          exactly what's going on, rather than letting a table component
          do the magic or running its own queries !<br>
          <br>
          Cheers<br>
          Rob<br>
          <br>
          <br>
          On 16/05/2012 9:39 a.m., Eric A wrote:
          <blockquote
            cite="mid:SNT128-W39812F80F77790E7E018729F1B0@phx.gbl">
            <style><!--
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

--></style>
            <div dir="ltr"> No, I've tried the Requery method and as I
              understand it the Requery method is effectively doing the
              same as the Open and Close sequence, i.e. forcing the
              select statement to be reissued against the database.<br>
              <br>
              For record deletion I call the nbDelete button method on
              the DBNavigator followed by closing/opening the ADOQuery
              and that does result in the data being refreshed in the
              DGBrid.&nbsp; <br>
              <br>
              For adding and editing records I am using the ADOTable
              "Append"/"Edit" and "Post" methods on the table followed
              by closing/opening the ADOQuery (or ADOQuery.Requery) and
              for some reason (which presently escapes me) the data is
              not refreshed in the grid.<br>
              <br>
              The question is should I even be using the ADOTable&nbsp; and
              would I better off just issuing raw SQL commands via the
              ADOCommand or similar component?<br>
              <br>
              Eric<br>
              <br>
              <div>
                <hr id="ecxstopSpelling">Date: Tue, 15 May 2012 21:09:31
                +1200<br>
                From: <a moz-do-not-send="true"
                  class="ecxmoz-txt-link-abbreviated"
                  href="mailto:vikas.image@gmail.com">vikas.image@gmail.com</a><br>
                To: <a moz-do-not-send="true"
                  class="ecxmoz-txt-link-abbreviated"
                  href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
                Subject: Re: [DUG] MSSQL DBGrid Refresh<br>
                <br>
                Hi Eric,
                <div><br>
                </div>
                <div>With AdoQuery you can try Requery method.</div>
                <div><br>
                </div>
                <div>This article might help.</div>
                <div><a moz-do-not-send="true"
                    href="http://edn.embarcadero.com/article/23011"
                    target="_blank">http://edn.embarcadero.com/article/23011</a>.</div>
                <div><br>
                </div>
                <div>Hope it helps</div>
                <div><br>
                </div>
                <div>Regards</div>
                <div>Vik<br>
                  <br>
                  <div class="ecxgmail_quote"> On Tue, May 15, 2012 at
                    8:51 PM, Eric A <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:eaa603@hotmail.com">eaa603@hotmail.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="ecxgmail_quote"
                      style="border-left:1px\00000d\00000a #ccc
                      solid;padding-left:1ex">
                      <div>
                        <div dir="ltr"> I am using a DBGrid with an
                          ADOQuery component for display, with
                          modifications to table data (edits, deletes,
                          adds) being done using a ADOTable component.&nbsp;
                          CRUD operations are done using the table
                          methods rather than raw SQL code.&nbsp; There's a
                          lot of fields in the database table so coding
                          the operations in SQL would be a pain.<br>
                          <br>
                          Despite trying to refresh the data in the
                          DBGrid by closing then re-opening both the
                          ADOTable and the ADOQuery component the data
                          in the DBGrid is not updated (unless I exit
                          the application and restart.<br>
                          <br>
                          I've seen this problem mentioned in various
                          postings but haven't yet seen a solution.&nbsp; Can
                          someone supply the elusive technique to get
                          the DBGrid data to refresh after the ADOTable
                          data is changed?&nbsp;&nbsp; <br>
                          <span><font color="#888888"><br>
                              Eric.<br>
                            </font></span></div>
                      </div>
                      <br>
                      _______________________________________________<br>
                      NZ Borland Developers Group - Delphi mailing list<br>
                      Post: <a moz-do-not-send="true"
                        href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
                      Admin: <a moz-do-not-send="true"
                        href="http://delphi.org.nz/mailman/listinfo/delphi"
                        target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
                      Unsubscribe: send an email to <a
                        moz-do-not-send="true"
                        href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a>
                      with Subject: unsubscribe<br>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <div><br>
                  </div>
                  -- <br>
                  &nbsp; vikas<br>
                </div>
                <br>
                _______________________________________________ NZ
                Borland Developers Group - Delphi mailing list Post: <a
                  moz-do-not-send="true"
                  class="ecxmoz-txt-link-abbreviated"
                  href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
                Admin: <a moz-do-not-send="true"
                  class="ecxmoz-txt-link-freetext"
                  href="http://delphi.org.nz/mailman/listinfo/delphi"
                  target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a>
                Unsubscribe: send an email to <a moz-do-not-send="true"
                  class="ecxmoz-txt-link-abbreviated"
                  href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a>
                with Subject: unsubscribe</div>
            </div>
            <br>
            <fieldset class="ecxmimeAttachmentHeader"></fieldset>
            <br>
            <pre>_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a moz-do-not-send="true" class="ecxmoz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a moz-do-not-send="true" class="ecxmoz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a moz-do-not-send="true" class="ecxmoz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
            <br>
            <fieldset class="ecxmimeAttachmentHeader"></fieldset>
            <br>
            <p class="ecx" align="left">No virus found in this message.<br>
              Checked by AVG - <a moz-do-not-send="true"
                href="http://www.avg.com" target="_blank">www.avg.com</a><br>
              Version: 2012.0.2176 / Virus Database: 2425/5000 - Release
              Date: 05/15/12</p>
          </blockquote>
          <br>
          _______________________________________________
          NZ Borland Developers Group - Delphi mailing list
          Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
          Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
          Unsubscribe: send an email to
          <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <p class="" avgcert""="" color="#000000" align="left">No virus
        found in this message.<br>
        Checked by AVG - <a moz-do-not-send="true"
          href="http://www.avg.com">www.avg.com</a><br>
        Version: 2012.0.2176 / Virus Database: 2425/5000 - Release Date:
        05/15/12</p>
    </blockquote>
  </body>
</html>