Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Environment blow out
Message
From
29/07/2003 12:07:31
 
 
To
29/07/2003 11:31:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00814319
Message ID:
00814567
Views:
9
This message has been marked as the solution to the initial question of the thread.
Hi Kevin,

This does not happen when I create the form and run it in VFP8. In fact, I created the form and put a table in the dataenvironment and threw a grid for it on the form. Then I loaded a 2nd table in the form's load event and threw a grid for it on the form. It all works fine. I then saved the form as a class (form classes do not have a dataenvironment as Chuck so kindly pointed out in this thread) and of course the table that was loaded in the dataenvironment on the form no longer exists for the form's use. That is when it blew. That is where my code I posted in this thread came from. I opened the class and copied the code and posted it here. It works fine when you do the same thing using just the form (no class) in VFP8 and call the form with DO FORM but since the form class has no dataenvironment, that part blows up when you create the form in code using CREATEOBJECT().

Tracy



>>No, duh,,,, what was I thinking???? :o) It's obviously not in the code either! good catch...
>>
>>>>This is very interesting. I first tested it by creating a form and loading a table in the form's load event and then loading a 2nd table in the form's data environment. I ran the form and it worked fine. Both tables were available on the grids.
>>>
>>>
>>>Sorry for jumping in but I didn't think form classes have dataenvironments, unless that's something new in VFP8.
>
>
>_____________________________________________________________
>
>Yes, this is true, but you would not need to create a class to easily test what I am talking about. Create a simple form, put an existing free table of any kind in the dataenvironment, then in the form load or init use another table and select it, then put in some code to reference something in on the table in the dataenivronment and it will let you know it was blown out because it will display an error. Of course I am still running VFP 7 and I am not sure if this was fixed in VFP 8...
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform