Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to run select on local view
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01392153
Message ID:
01392163
Views:
43
Thanks, I'll try that. I thought there used to be a similar problem with using just the cursor name in a query, which was why I started using the dbf() function years ago....probably for something that VFP fixed in later versions, I suppose.


>A cursor may not have physical presence on a disk in which case DBF() reports none-existent file name.. A query can use a cursor name directly
>
>	Select *, Space(5) As Lineno ;
>From sbt_artran ;
>Where Item != "300 " And Item != "DEL" And Item != "310" ;
>		AND Item != "312" Order By 1,3 Into Cursor Tran Readwrite
>
>>This one is quite enfuriating and any alternatives would be greatly appreciated! I am trying to run a query from a query result and all has been running fine until lately when I get a "file not found" error. Recently we added a hard drive to the machine and moved the foxtemp directory there. The dbf('sbt_artran') command shows the file should be in the e:\foxtemp directory, but I find no file there, even after a flush. Ironically, when I step through the code on the machine, it works just fine. The relevant code is below:
>>**arytrn01 and artran01 are both fox tables listed in a dbc as a local view.
>>the _tally is around 200,000 records.
>>
>>	Select Distinct invno, custno, Item, Descrip, disc, taxrate, cost, price, qtyord, ;
>>		qtyshp, invdte, ponum, extprice, salesmn, terr, Class, stkcode, taxable, arstat, ;
>>		glsale, glasst, Batch, taxdist, taxtype, fcreatdate From arytrn01 ;
>>		unION (Select invno, custno, Item, Descrip, disc, taxrate, cost, price, qtyord, ;
>>		qtyshp, invdte, ponum, extprice, salesmn, terr, Class, stkcode, taxable, arstat, ;
>>		glsale, glasst, Batch, taxdist, taxtype, fcreatdate From artran01);
>>		INTO Cursor sbt_artran
>>
>>	Select 0
>>	l_sbt_artran = dbf('sbt_artran')
>>	l_sbt_artran_tally = _tally
>>	
>>	FLUSH 
>>
>>	WAIT WINDOW "Creating Tran file..." TIMEOUT 60
>>	
>>	Select *, Space(5) As Lineno From Dbf('sbt_artran') Where Item != "300 " And Item != "DEL" And Item != "310" ;
>>		AND Item != "312" Order By 1,3 Into Cursor Tran Readwrite
>>
>>The last line is what generates the file not found error.
>>
>>I haven't tried a "copy to" command from sbt_artran to see if I get the same message. I suppose I would.
>>
>>Any suggestions?
>>
>>Thanks in advance!
Steve Howie, owner
DaSH Technology
Denver, CO
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform