Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drop tables
Message
From
31/10/2005 17:32:40
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
 
To
31/10/2005 07:01:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01063462
Message ID:
01063845
Views:
9
Hi,
Would it be better to use a temporary cursor, they clean themselves up when you exit the program.

Here is an example from VFP Help
CLOSE DATABASES
CLEAR
CREATE CURSOR employee ;
 (EmpID N(5), Name Character(20), Address C(30), City C(30), ;
  PostalCode C(10), OfficeNo C(8) NULL, Specialty Memo)
DISPLAY STRUCTURE
WAIT WINDOW "Press a key to add a record."

INSERT INTO employee (EmpId, Name, Address, City, PostalCode, ;
   OfficeNo, Specialty);
   VALUES (1002, "Dr. Bonnie Doren", "University of Oregon", "Eugene", ;
   "98403", "", "Secondary Special Education")
BROWSE

* At this point you can copy this record to a permanent table.
CLOSE ALL   && Once the cursor closes, all data is flushed from memory.
CLEAR
>hi,
>thank you for reply,it works
>
>i try to get data from my table AFM, via select somthing put all records at
>table am2,select again from afm put all records at am3,
>every time i run my form ,becuse i get this data form outside my dirctory
>
>for that i need to delete the 3 tables afm,am2 and am3 every time.
>
>thanks
>
>>>hi all,
>>>
>>>any idea ,help
>>>
>>>i need to drop 2 tables am2,am3 from my database(mydbc1),
>>>every time i run my form.
>>>
>>>drop e:\depstudy\mydbc1\am2
>>>drop e:\depstudy\mydbc1\am3
>>>
>>>
>>>thanks
>>
>>
>>OPEN DATABASE e:\depstudy\mydbc1\mydbc1
>>if indbc('am2','Table')
>>  DROP TABLE am2
>>endif
>>if indbc('am3','Table')
>>  DROP TABLE am3
>>endif
>>
If you would drop them every time you run a form why are you adding them to a database in the first place.
>>Cetin
Regards N Mc Donald
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform