Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataEnvironment
Message
De
05/12/1997 10:32:48
Jeff Tucker
Mackinac Center For Public Policy
Midland, Michigan, États-Unis
 
 
À
05/12/1997 10:09:43
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00064017
Message ID:
00064028
Vues:
25
>>This should be an easy one to answer.
>>
>>I have two forms.
>>
>>The first is a password entry form. It has a dropdown listbox of user names populated from a table in the database projmain.dbc. The user enters their password and clicks OK. The code compares the entered password with the official password in the user table. If it is accurate, the code calls the second form and passes the userName and userID.
>>
>>The second form has two grids populated by views on separate pages, but the grids refuse to show the data. In fact the grid does not even show columns or headers--just a white box. (Sometimes they appear but I have yet to figure out why) I watch the OpenDatabases dropdown list on the tool bar and the projmain database appears to close when form1 unloads, and it does not come back for form2. I put the following code in load method of form two. My goal was to make sure eveything was open. I have all my tables and views in the DataEnviroment but they do not appear to open.
>>************************
>>IF USED("projmain")
>> wait window "Used"
>>ELSE
>> OPEN DATABASE \\server\database\project\projmain.dbc SHARED
>> wait window "Was Not Used"
>> IF USED("projmain")
>> wait window "Now is Used"
>> EndIf
>>ENDIF
>>This.DataEnvironment.OpenViews = 0
>>************************
>>
>>The only wait window I see when this code runs is "Was Not Used"??
>>
>>Any help would be great.
>>
>>Thank you,
>>Jeff
>
>First off, you should used DBUSED(). USED() is for aliases.
>Second, what do you mean by "two grids populated by views on separate pages"? Are these defined views in the DBC, or are they cursors? If they are cursors then they can't be seen by the DS created for form2.
>Third, I never use a Private DS for login screens. (this might be personal pref. but I tend to use system info in the Default DS)
>
>HTH

I can try the DBUSED() right away.

My views are in the database. They are not cursors. I was not sure if the fact that the grids were on separate pages on a pageframe would make a difference in their ability to reference a view in the form. For example can the following code be placed any where in the form as long as vTotalGrid is a view in the form's DataEnvironment?
results = requery("vTotalGrid")
OR do I have to say something like ("Thisform.vTotalGrid")

I am on a steep learning curve with foxpro, and I am not sure what you mean by DS, or even how I would create a login screen with the default DS.

Thanks,
Jeff
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform