Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 6 using the wrong container ????
Message
De
14/04/1999 16:52:41
 
 
À
14/04/1999 16:41:13
Jeff Lovin
Dewitt & Company Inc
Houston, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00208317
Message ID:
00208394
Vues:
26
>Hi Ed,
>
>Well, I am afraid that I am probably going to show my true self, and let you know that I don't quite understand your instructions...
>
>I currently have 4 forms in my application, plus some reports and some labels. Do I have to go into each one and make this change in the data environment? Or can I make one global change for the whole thing?
>
>You also made mention that it would work if there were no free tables.... I do not understand what you mean... All of the tables reside within the the database container... Are you asking if any reside outside of the container?
>
>ok, now, one last question (actually, it is more than one, but who is counting...<grin>)
>
>Thisform.SetAll("Database",cDataPathName,"Cursor")
>
>This was the instruction you gave me... is 'database' the name of the actual database container, or is it the name of the table? does it have to be in quotes?
>
>what do you mean by 'cursor'?
>
>if this is setup correctly, my line would look something like this:
>Thisform.SetAll("Dewitt",w:\,???)
>
>*** not sure about the cursor....
>
>thank you in advance for your time and for helping this new person along....
>
>Jeff Lovin

If you open DE and look for DE.Cursor.Database properties in property sheet, you will see that it carries hard-coded paths from your development environment. So the idea is to reset them to right path in run-time. The code, I gave you, does this job by one command. SetAll is native VFP method to change some property ("Database" in this case ) for all members ("Cursor" in this case) of container ("Thisform") in this case. "cDataPathName" is correct dbc file path+name. You may keep it as some application object property, i.e. use oApp.dbcpathname.
So you may use just one line statement and fire it for each DE, except the case if you have free table in your DE. It's because, unfortunately, DE.Cursor associated with free table has empty Database property, but keeps hardcoded path in its CursorSource property. Again, it's doable to fix this case too, it will just take more coding.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform