Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Add Record in Grid with more than 1 table inside
Message
From
12/05/2000 16:40:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00368379
Message ID:
00369245
Views:
29
>Cetin !!
>
>Thanks To Reply my message. I have try that, but were there any difference between
>
> INsert into <....> values (......)
>
>with
>
> Sele <....>
> appe Blank
> replace (....) with (....)
> .......
>
>
> Have try both but, which one have the affective result.
>
> And new problem come, my lecturer ask me to add the child table in a grid, but button to add is related to
> Formset. So how's to make it happen, cause i have try all from set filter to, etc but after closing the formset
> and back the main form, the grid just add by ' 0' record.
>
> So please, help me.
>
> By the way sorry if, you little bit hard enough to understand my English, cos i' happen to be a former.
>
> Thanks again,
>
>
> Viva Apocalypse !!!


There are some differences. First of all you don't need to change workarea or check if the table is open or not. When using grids this sometimes prevent undesirable effects.

Form or formset wouldn't matter. Just be sure you fillin the field that has foreign key info. Say you have "customer" parent table with "cust_id" primary key and would add an order into child table "orders" which also has cust_id field (as foreign key field).

insert into orders (cust_id) values (customer.cust_id)

Also make sure that you tableupdate() when you're done with "orders" (typically "save" button).
"Set filter" honestly is not something I would suggest. I use it "only" if I cannot find another way.
Check Tastrade sample and also using testdata.dbc create a one-to-many form (with wizard) and check, "txtbtns" class code in wizstyle.vcx
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
Reply
Map
View

Click here to load this message in the networking platform