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:
00063739
Views:
107
>> WITH Thisform
>> WITH .Dataenvironment
>> .Addobject([Cli_name],[Cursor])
>> .Cli_name.Alias=[Cli_name]
>> .Cli_name.CursorSource =[cli_name]
>> .Closetables
>> .Opentables
>> ENDWITH
>> ENDWITH
>
>How about .CursorSource = 'c:\cchprog\cli_name.dbf'?
>
>Actually, why don't you just add it manually to the dataenvironment and then
>copy the properties? That's what I've been doing to find these things out....

Well, what I finally did was something I should have done a long time ago, but the beast just continued to grow and I wasn't motivated enough to clean up.

All those ???_name.dbf files should really have been in a fields file. They all had the same structure, so the only discerning factor was the name of the file.

So I added a Fields file, appended from all of the ???_name files, and now I only need the fields file to change filters, which is easy enough.

However, I would on occasion still like to programmatically add a free table to my screens. For instance, I have several "Filter" screens that are utilities which allow my users to browse and print on criteria which they define. The only discerning factor is the data environment for those, since I've added form properties which are populated by the calling program so I don't have to change any code.

I don't understand what you mean by copying the properties. Are you're saying that I can have a file called clients.dbf in the data environment, and completely change the file to, say, invoices.dbf just by changing its name, alias, etc.? Just want to make sure I understand what you're saying.

JR

PS--I bit the bullet and called the $95/issue line at MS to answer this question. Believe it or not they escalated it to the next level, and I'm waiting for someone to call me back. So even though they have a command to address it, it still may not be possible to use it in a straight-forward manner as you have suggested.
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform