[DUG] Sql query
Alister Christie
alister at salespartner.co.nz
Fri Jan 14 15:23:39 NZDT 2011
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
id := QToDo.FieldByName(id).AsInteger;
QToDo.Close;
QToDo.Open
QToDo.Locate('id', id, []);
substituting id for whatever your primary key is. Not elegant but
better than restarting the application.
Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington
On 14/01/2011 12:49 p.m., Marshland Engineering wrote:
> 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.
> Is refresh the correct property or is there something else.
> Thanks Wallace
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110114/d9a0cd1e/attachment.html
More information about the Delphi
mailing list