Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.Dataenvironment.AddObject & Buffering
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00063231
Message ID:
00063342
Views:
74
>>>>>>>>>Please see my message to Garrett Fitzgerald regarding the reasoning. If
>>>>>>>>Microsoft has the addobject command available for the data environment, there must be a way to make it work. . .
>>>>>>>>>
>>>>>>>>
>>>>>>>>I'm reading it now.
>>>>>>>>Remember some consider the DataEnvironment to be a crutch. It is not necessary. Any thing you can do in the DataEnvironment can be done programatically.
>>>>>>>>
>>>>>>>>BTW, do all of those 100 files have the same structure?
>>>>>>>>
>>>>>>>>>JR
>>>>>>>
>>>>>>>Really? I was under the impression that only files in the DataEnvironment would handle table- & row-buffering.
>>>>>>
>>>>>>>
>>>>>>>The 100 name files have the same structure, but the files which they will be manipulating have different structures.
>>>>>>
>>>>>>No you can set up buffering manually as well as through the DE.
>>>>>>
>>>>>>You could using an alias. Add the table to the DE and then when you select table just alias it always with the same name of the table you added to the DE.
>>>>>>I'm sorry, I didn't spend enough time reading through your message to Garrett whether this is a possible solution or not.
>>>>>
>>>>>The problem is that it's not actually using the file when it's added to the environment. ie:
>>>>>
>>>>>Thisform.Dataenvironment.Addobject([Cli_name],[Cursor])
>>>>>Thisform.Dataenvironment.Cli_name.Buffermodeoverride =2
>>>>>SELECT Cli_name
>>>>>
>>>>>will return an "Alias does not exist" or whatever--it's not in use.
>>>>>
>>>>>JR
>>>>
>>>>That's probably because you didn't set Alias property yet.
>>>>Thisform.Dataenvironment.Addobject("CursorX","Cursor")
>>>>Thisform.Dataenvironment.CursorX.Buffermodeoverride =2
>>>>Thisform.Dataenvironment.CursorX.Alias="Cli_name"
>>>>SELECT Cli_name && now it should work
>>>
>>>Wow--I thought this was going to be it, but alas, or alias, it still says "Alias 'Cli_name' not found"
>>>
>>>JR
>>
>>This thread is really big, and I don't know what is inside it, sorry. However, may I ask you silly question: do you open 'Cli_name' table programmatically (USE...) somewhere?
>
>No, it's not used anywhere else.
>
>JR

But you should open table, either by USE..., or better issuing DE.Opentables (after you set Cursor.Alias property).
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform