Solution 1:
select cuscod,date,amount from customer order by cuscod,date desc group by cuscod into dbf custtemp distinct
Solution 2:
select *,max(date) as datamax from customer order by cuscod,datamax group by cuscod into dbf custtemp distinct
You must use distinct clause!
If a table it is open with SET EXCLUSIV OFF and you change later in SET EXCLUSIV ON your table will remain with EXCLUSIV OFF access.
One solution can be this (in your program):
use mytable share
or
use mytable exclusiv
If you wan't to index /reindex your table you must have exclusive access ...
Supose you have two tables :firsttable and secondtable with a common field named code.
You can try this:
select code from firsttable where code not in (select code from secondtable) union select code from secondtable where code not in (select code from firsttable)
You will obtain an cursor...
You can use deleted() function :
use yourdatabase
scan
if deleted()
wait window 'Record flagged for delete! '+str(recno(),5) timeout 1
endif
endscan
use
select fieldname,count(fieldname) as contor from yourdatabase having contor>1 into dbf tmpdatabase group by fieldname order by fieldname
*tmpdatabase will contain only records which have duplicate
*and a new field named contor which contain the number of *duplicates
close database
select 2
use...
You can use SETUP wizard , which allow you to create install programs or you can make your own install and distribution program which must include vfp6r.dll and vfp6enu.dll (and of course your programs , forms , reports,etc) .
Verify if it is any
SET EXACT ON
command in your program.
Another cause of your problem could be
SET DELETED ON
in combination with some indexes(specially with UNIQUE clause).
Finally you must verify if the index key is involved in a relation with another parent/child table .
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.