Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing a table in VFP 5.0
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00025903
Message ID:
00026283
Views:
35
>>>>THISFORM.Check9.value = 0
>>>>CLOSE DATABASES
>>>>OPEN DATABASE ims SHARED
>>>>USE ourdata
>>>>REMOVE TABLE ourdata DELETE
>>>>SELECT *;
>>>> FROM ims!examdata LEFT OUTER JOIN ims!classes ;
>>>> ON examdata.classid = classes.classid ;
>>>> INTO CURSOR cursor1
>>>>SELECT *;
>>>> FROM cursor1 INNER JOIN ims!students ;
>>>> ON cursor1.studentid = students.studentid ;
>>>> INTO CURSOR cursor2
>>>>SELECT *;
>>>> FROM cursor2 INNER JOIN ims!instructor ;
>>>> ON cursor2.instid = instructor.instid ;
>>>> INTO CURSOR cursor3
>>>>SELECT *;
>>>> FROM cursor3 INTO TABLE ourdata
>>>>BROWSE
>>>>*goApp.DoReport("reports\ourdata.frx")
>>>
>>>How does ourdata get added to the DBC? remove won't work unless it's in there...
>>
>>I originally added it manually with the New table without any data. I also included it in the project. So I know it's out there. I have browsed it.
>
>Been away for a day, but see problem still exists?
>I would do Jim's suggestion, use a free table. There doesn't seem any point to add to DBC if you're just going to delete it. Also, you can't just do a query into a DBC table, if that's your intention, that may be causing the problem...whatever you decide, if you still want to use DBC, try using INDBC() to check table existence before REMOVE:
>
>If INDBC(etc), then remove table delete...else message 'not in DBC'

The problem was solved by making "ourdata" a free table as suggested by Jim. I removed the "remove" statement, SET SAFETY OFF and then the SELECT * FROM CURSOR3 INTO TABLE ourdata worked perfectly. Many thanks to you all for helping me on this one. Don.
Previous
Reply
Map
View

Click here to load this message in the networking platform