Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I drop it?
Message
De
05/12/2013 10:32:29
 
 
À
05/12/2013 09:42:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01588891
Message ID:
01589350
Vues:
74
>>>>>why not :
>>>>>sele * from some_alias into cursor tmpCur where .f.
>>>>>
>>>>>this gives you the same in one line!
>>>>
>>>>Hi Peter
>>>>
>>>>I know. With readwrite clause you should get the same; proper local cursor. But somehow it just isn't !
>>>>
>>>>I started in fact doing doing it at some point in the past, but then run into some strange/unexpected problems on resulting cursor
>>>>which I simply could not explain. It was one of those situation where by all logic everything should just work but for some reason it does not!
>>>>
>>>>After beating my head for a while, I tried to reverse steps in terms of thinking what I did different now then what I did so many times before,
>>>>and it was exactly that switch from creating cursor from array - versus cute/elegant one line statement.
>>>>
>>>>Moment I reverted back to old way - problem was gone! You can't explain it rationally (at least I can't) but this is exactly what happened. It does not happen every time you create cursor with one line sql, but problem DID occur in a worse possible
>>>>manner - which is random and without logical reason or bug in the program.
>>>>
>>>>I wish I had time/skill of that Italian guy (Fabio ?) to dig deep/debug and come to the bottom of why/how it is all happening,
>>>>but since that is not the case I simply reverted back and continued down the line my old less elegant but problem-free way.
>>>>To clarify, I did NOT have field longer then 10 chars which created problem to Denis. In this case problem was something else.
>>>>What exactly I do not know, but it did happen.
>>>>
>>>>I know it is just war zone anecdote, but it might help someone to look at yet another possible cause of some weird problem in similar scenario.
>>>
>>>
>>>A cursor is just a hybrid - table / free table
>>>
>>>For alter table, it behaves like a free table
>>>
>>>It is possible - I've done it in the past - to have a record validation rule (and I think also insert/delete/update triggers ) as long as you create the cursor with 'create from array'
>>
>>Yes, indeed you can noodle with the structure array to add cursor some extra props. You can index it, alter it(*) and what not, no mystery there;
>>What interests me is what's the difference between cursors created with sql query + readwrite clause and cursor created from struct array.
>>Normally they should both end up being dbfs in some temp directory. (Which can be checked by calling dbf() function on given alias)
>>
>>It seems that they are not exactly the same. That diff is what made former being prone to problem I had (see above post to Peter)
>>and later working just fine. My best guess is that VFP internals involved in their processing are different when sql query is involved
>>(maybe some internal table dictionary function supporting for instance long field names etc) versus direct create cursor command
>>which perhaps limited to fox2x scope. Do you have more insights what that difference can be?
>
>
>I wasn't aware that there was any difference at all

I thought so to. Not any more.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform