Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controls Unbinding
Message
 
 
À
21/08/2001 09:39:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00546687
Message ID:
00546717
Vues:
21
Hi!

It is common sutuation when you need to query data by SPT using parameters for form. But form parameters you can get only from the Init event of the form, that is too late after all controls initialized (and already screamed about contol source does not exist). The solution here is to create empty cursor using CREATE CURSOR command with the similar structure to the cursor returned by the SPT function in the Init. In the Init you just close that empty cursor and query data instead of it. I guess this approach was used before.

The solution with moving to LOAD method will work, until you require to query using parameters from Init...

HTH.

>Hi All,
>
>When I open my main form all the controls are bound to a cursor that is created in a procedure that is called in the init of the form. I am getting an error saying that the controls are being unbound. I checked, and the procedure that will create the cursor is not yet being called. In all the other programs I've done this way the controls seen to wait till that procedure is called. This is a
>program that I inherited that was still in development. I can't seem to find what they had done to cause the controls to react before the FORM.init completes. I connect to the database in the FORM.init. And the procedure use SPT to retrieve the data into the cursor. Any idea what the differance is?
>
>TIA
>MIKE
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform