Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing SQL results
Message
De
11/09/1997 07:42:51
 
 
À
10/09/1997 21:28:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00049056
Message ID:
00049481
Vues:
54
>>>>>To verify that:
>>>>>1. Take a small dbf, 2-3 records, 2-3 fields. (Small enough to fit into memory.)
>>>>>2. Run SELECT *, .t. AS Dummy FROM MyTable INTO CURSOR TempRes NOFILTER
>>>>>3. ? DBF() && returns a valid temp file name.
>>>>>4. ? FILE(DBF()) && returns .f.
>>>>>5. USE (DBF()) AGAIN && Gives an error because the temp file doesn't exist.
>>>>
>>>>Vlad, I cannot duplicate the failure. For example, given a 10 record table with 2 columns, each of length 5 characters. I have 80 meg of memory on my machine, so I think the table is small enough to fit into memory:
>>>>
>>>>select * from SmallTbl into cursor SmallCursor nofilter
>>>>use (dbf("SmallCursor")) again in 0 alias NewCursor
>>>>use in Select("SmallCursor")
>>>>sele NewCursor && This is a now read-write cursor with 10 records.
>>>>
>>>>This works just fine. BTW, I'm using 5.0a.
>>>
>>>This is kinda weird. I'd like to know why this works for you and not for all the others that tried it!
>>>
>>>I'm using also 5.0a. What's the date of the product in the About window? What OS are you using?
>>>
>>>Vlad
>>
>>Vlad, I'm switching thread-segments here to connect up with Mark's code. The problem is that sometimes VFP finds the code just fine, as Mark found. I think that VFP and WIN95 (never tested any of this on NT) share all the information on temporary files, and that sometimes they connect correctly and sometimes not. Commands that look like they're behaving the same, don't really.
>>
>>For example, USED() uses the alias, not the filename, so USED(dbf()) won't work reliably on a cursor, and FILE() flat out says the cursor doesn't exist.
>>
>>In my case, the problem was with APPEND. VFP needed a specific on-disk file to append from, and I didn't have one. USE .... AGAIN seems to work correctly, whether the file is on-disk or not.
>>

Just for verification, I have been using this technique in various situations successfully on WinNt 4.0 OS, VFP 5.0a. However, it would be nice if MS would slow down a bit, consolidate and correct some of the more irritating "features" before moving ahead to make M$ :-), especially since you can never be sure when a situation might arise when a technique that has been "working" quits :-).

Bill

>>Barbara
>
>You're right and I found out what I was doing wrong: I tried always:
>use (dbf()) again alias blabla
>instead of
>use (dbf()) again in 0 alias blabla
>So, the cursor was closed just before opening it again... Thanks to Frank and Barbara for opening my eyes. :)
>
>Still, the bug is there even if this works. :(
>
>Vlad
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform