Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you get a Form to recognize an open Data Session
Message
 
À
14/11/1997 13:02:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00060289
Message ID:
00060448
Vues:
28
>>>>SET DATASESSION TO nDsnumber
>>>>Thanks for the reply. It seems to be similar to the "SET VIEW TO myview" command. Where exactly do I place this snippet of code?
>>
>>Where to issue this command? I don't know, it depends on your app flow. Maybe Form.Load event would be appropriate.
>
>It seems maybe that you are a little unclear on Private datasessions vs. Default datasessions, and DSs in general as they apply to forms. When designing a form and adding tables to the datasession, the datasession you are building is the datasession for that form. You can duplicate it in any other form. If you want the datasession scoped only to that form, and record pointers to be independent of the positions in other forms or datasessions, you should set your form to use Private datasessions. If you would like a movement of the record pointer to be reflected in all forms, set the form to use the default datasession.
>
>I apologize if I am trying to explain a concept that you are already familiar with, but I got he feeling that you are going about your app design wrong. There should be very few instances (if any) that you should have to use SET DATASESSION. In general, your app should either use only private datasessions, or only the default datasession, with exceptions only where they are specifically needed. It can all be little confusing at first, but makes complete sense after you are familiar with it. My personal preference is using only private datasessions, and letting each form take care of positioning the record for itself. Just trying to point you in the right direction. HTH
>
>Thank's for the reply, and no need to apologise, I'm not yet a pro at foxpro. I am still a beginner. I still cannot seem to get the Form to see the tables. Step by step, this is what I have done: I have opened an empty test folder, and have copies to .dbf files to that folder. I have set the default to c:\test. I have created indexes for each table on matching fileds. I go to the foxpro menu: Window, Datasession and get a dialog box. I add both tables, and set the relationship between them. I then go to the menu: File, New, Form. Then from the form control tool bar I place a field-text box onto the form. I then open the properties window for this field-text box, and go to the Data tab. I then go to Control-source, and then click on the Fx button on the left which pulls up an Expression builder box. PROBLEM: there are no fields to choose from - the fields box within this Expression builder dialog is totally blank/empty.!!! This is my problem. (In foxpro 2.6 under the same circumstances you could select any fields from both of these tables, from a similar expression dialog box) What do I have to do, step by step, to get this Controlsource - Expression builder to see field data form these to tables?
David Wheeldon
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform