Hi,
what about 

query.close;
query.sql.add('select whatever from wherever')
query.open; 
dbgrid1.Refresh;

Regards,
Johan

  ----- Original Message ----- 
  From: schoemanshaun 
  To: [email protected] 
  Sent: Wednesday, May 09, 2007 10:45 AM
  Subject: [delphi-en] Re: Sql Query problem


  Hi

  Thanks for the advice but it is not helping?
  Any other ideas?

  Thanks

  --- In [email protected], Alireza Alef - G 
  <[EMAIL PROTECTED]> wrote:
  >
  > You have to close you dataset after closing the clientdataset and 
  thet reopen them
  > 
  > schoemanshaun <[EMAIL PROTECTED]> 
  wrote: Hi.The problem i am 
  experiencing is a follows, I run a query, the 
  > result is
  > displayed in the dbgrid, i run the report and the result is fine.
  > I then empty the clientdataset, a second query is run but the 
  result 
  > displays
  > the records from the previous query.Even though i empty the 
  > clientdataset and run a new
  > query, as soon as i refresh the clientdataset it displays the 
  result 
  > of the previous query.
  > 
  > Any ideas? 
  > 
  > dmmanchq.ClientDataSet1.Refresh;
  > dbgrid1.Refresh;
  > dmmanchq.rvpManchq.Open;
  > dmmanchq.rvpManchq.SelectReport('reports',False);
  > dmmanchq.rvpManchq.Execute;
  > dmmanchq.rvpManchq.Close;
  > dmmanchq.ClientDataSet1.EmptyDataSet;
  > 
  > 
  > 
  > 
  > 
  > 
  > ---------------------------------
  > Yahoo! Answers - Got a question? Someone out there knows the 
  answer. Tryit now.
  > 
  > [Non-text portions of this message have been removed]
  >



   

  __________ NOD32 2255 (20070509) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com


[Non-text portions of this message have been removed]

Reply via email to