Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select (lcCursor) not selecting cursor???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00346906
Message ID:
00347069
Vues:
26
>>Hi, Nigel
>>
>>You definitely do not have a syntax error. I once ran into something like this on a project I did. I called a method that created a cursor. Unfortunately the method was in an object that was in a different data session, and therefore the cursor was created in a different data session.
>>
>>But since you are getting an empty alias IMMEDIATELY after creating the cursor,that can't be it. Must be something along those lines...
>>
>>Can you post not only the create cursor code, but a good chunk of the code preceding it? Maybe we can spot something. BTW, have you tried running this on a different machine to make sure it is a VFP problem?
>
>This is the offending code:
>
>	lcCursor=SYS(2015)
>	lnSelect=SELECT()
>	
>	Create Cursor (lcCursor) (cTitle c(100), cSubject c(100), cPrintData m)
>
>	lcCaption=toCurrentForm.Caption
>	lcTitle=AllTrim(Left(lcCaption, At(':', lcCaption)-1))+" Notepad"
>	lcSubject=AllTrim(SubStr(lcCaption, RAt(':', lcCaption)+1))
>	Insert Into (lcCursor) Values (lcTitle, lcSubject, toCurrentForm.ActiveControl.Value)
>	Select (lcCursor)
>
>*? For some reason, at this point, the cursor is NOT selected so
>*? the report print statement displays an open dialogue box.
>*? The cursor was being selected in debug mode with set step on!
>
>
>You see why I'm frustrated?


Absolutely. There is nothing wrong with your syntax as posted

The only thing I'm wondering: Is the method from which this is called part of an object in the same form which toCurrentForm points to?

If not, could they be in two different datasession?
Thanks

Gar W. Lipow
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform