<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Rather than doing a Refresh you could do an Open and a Close. If
you do this you probably want to store what record you are on<br>
<br>
id := <font face="Arial" size="2">QToDo.FieldByName(id).AsInteger;<br>
</font><font face="Arial" size="2">QToDo.Close;<br>
</font><font face="Arial" size="2">QToDo.Open<br>
</font><font face="Arial" size="2">QToDo.Locate('id', id, []);</font><br>
<br>
substituting id for whatever your primary key is. Not elegant but
better than restarting the application.<br>
<pre class="moz-signature" cols="72">Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
<a class="moz-txt-link-freetext" href="http://www.salespartner.co.nz">http://www.salespartner.co.nz</a>
PO Box 13085
Johnsonville
Wellington </pre>
<br>
On 14/01/2011 12:49 p.m., Marshland Engineering wrote:
<blockquote cite="mid:B760FA6341D24E14A232D7186EFE54DB@Aquilo"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.6001.18999">
<style></style>
<div><font face="Arial" size="2">I'm viewing a SQL query in a
dbgrid. When I add a record to the source db and I run
QToDo.Refresh it does not include the new record in the
dbgrid. If I close the application and re-run it, the record
is displayed. </font></div>
<div> </div>
<div><font face="Arial" size="2">Is refresh the correct property
or is there something else. </font></div>
<div> </div>
<div><font face="Arial" size="2">Thanks Wallace</font></div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.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@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe</pre>
</blockquote>
</body>
</html>