Re: New to Sql Database's



From the looks of your code there is no need to do the locate. You query is
very selective and should only return one record anyway. After the open you
can just assign the Caption property...

My guess is he is trying to eliminate a query that returns no records.
If DataSetCustomer.RecordCount >0 then

Would handle that a bit more elegantly
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • Re: cancel during asyncfetchnonblocking
    ... >The problem with this seems to be, that the query is not really cancelled ... >AdoDS.Close - looking at my memory usage it climbs incredibly. ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: How to record quotation marks
    ... query1.sql.add('insert into memorando (chamada, texto) values ... or use parameters in your query ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: About lookup fields..
    ... No you will have to use a TadoDataset and then create the field in your query to ... sort by it. ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: ADO DBASE Seek
    ... Willi ... > Probably using a select query ... > Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: cancel during asyncfetchnonblocking
    ... >Can you use the same object for another query? ... >settings but can't seem to get this working in an OK ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)