Hello
I was trying to use Safe Select, and it doesn' t work, look at the following:
* This is the working cursor
SELECT code FROM product WHERE 0 = 1 INTO CURSOR tmpProduct
* This is the real query
SELECT * FROM product WHERE code=7 INTO CURSOR curdummy
* Clear the working cursor and append the results of curdummy
SELECT tmpProduct
ZAP IN tmpProduct
APPEND FROM DBF("curdummy")
USE IN curdummy
Anyone should expect a tmpProduct table filled only with products with a code of 7, but in fact the result is a tmpProduct table filled with all the records in the PRODUCT table.
I inserted a BROWSE after I populated the curdummy cursor to see what was happening and it showed the desired results, only products with a code of 7, but after I append the results of curdummy into tmpProduct I browse it and it shows all the records of the PRODUCT table.
What could be wrong THANKS
Visual FoxPro2
|