Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically Add Table In Data Environment
Message
From
13/08/2002 11:21:29
 
 
To
13/08/2002 05:15:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00689012
Message ID:
00689160
Views:
25
Cetin,

Could you explain why it is better to code the file opens in the form load? It seems like it would be advantageous to be able to reference the properties as objects. However, I do know that in some cases things have not worked as I expected when I did this. For example, I wanted to change the buffering mode of my cursor to 3, create an index, then set it to 5. When I did it in the form load with cursorsetprop() I didn't have any problem. When I attempted to modify the Buffermodeoverride property in the DE, It gave me some sort of error message - I don't recall exactly what - something to the effect that the data environment would have to be reloaded before changes took effect. Are these the types of things that happen that make it better to code it in the load?

TIA for your consideration



>>I'm Sorry But I'm just a beginner of it..
>>
>>I still don't get it what you told me...
>>
>>What does it mean ????
>>
>>Hope you tell me more.....
>>thanks...
>
>
>with thisform.Dataenvironment
> .CloseTables
> .Addobject('mycursor','cursor')
> with .myCursor
>   .Alias = 'myAlias'
>   .Database = 'c:\myPath\myDBC.dbc'
>   .cursorsource = 'myTable'
> endwith
> .OpenTables
>endwith
>
Relation would be in the same manner. However if you don;t have a good reason do not try to do this in dataenvironment. Instead directly code in load or init depending on your needs. ie: form.Load
>
>use myTable in 0 order tag myTag
>use myParent in 0
>select myParent
>set relation to myField into myTable
>
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform