Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include table online to a form
Message
From
26/11/2002 04:30:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/11/2002 04:22:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00726845
Message ID:
00726847
Views:
22
>Dear Friends
>
>I have included four table in a form during development time.
>The four table are from one database only.
>
>Now I like to include another table during run-time which is from another database located in some other machine on the network.
>
>I have written the following code but it's not working properly.
>
>form.load()
>
>this.dataenvironment.addobject('newtable','cursor')
>this.dataenvironment.newtable.bufferoverride = 3
>this.dataenvironment.newtable.exclusive = .f.
>this.dataenvironment.newtable.database = 'k:\folder\database.dbc'
>this.dataenvironment.newtable.cursorsource = 'bill.dbf'
>
>But when I give the command SELECT BILL, it gives an error - 'ALIAS NOT FOUND'
>
>Please suggest me how to include table during run-time
>
>Thanking you
>yours truely
>Aritra Roychoudhury

Aritra,
When you add a table to DE this way, you should DE.closetables and opentables. However you don't need to add that to DE. In load :

use 'k:\folder\bill.dbf' alias 'bill' in 0
cursorsetprop('Buffering',3,'Bill')

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform