Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Relation and Grid problem
Message
 
 
À
17/09/2009 13:26:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01424955
Message ID:
01424957
Vues:
43
See also <B>Re: Grids and related tables. Killing me.</B> Thread #1393684 Message #1393772

>Hi,
>
>I have 1 foxpro table and a cursor from SQL that I set a relationship.
>1) Customers (foxpro)
>2) curCustomer_Type (cursor from Customer_Type (SQL Server) )
>
>- Basically I can assign a customer type by adding a record on "Customer_Type" with a foreign key on CustomerId. To simplify the example we can only make it type VIP.
>- I set a relation betweent the 2 tables the following way:
>
>SELECT Customers
>SET RELATION TO CustomerId INTO curCustomer_Type
>
>Now I have a grid to look at the customers and their type, 'customer' column comes from 'Customers' table, Type column comes from 'curCustomer_Type' cursor .
>
>Customer       Assign    Type
>------------------------------------------------
>John Smith    (Assign)   
>Mary Kay      (Assign)   VIP
>Ted Johnson   (Assign)   
>Marco Ginn    (Assign)   
>Ana Karova    (Assign)   VIP
>Uri Juno      (Assign)   
>
>
>
> (Assign) is actually a command button which will run code to add a record on "curCustomer_Type", so once they click on that button, the record will be created, the relationship will kick in and the "Type" column will display VIP.
>
>To explain the problem, I'm going to use the example at the top. If I hit (Assign) for 'Marco Ginn' then it's gonna put 'VIP' for the type but the top record also gets VIP (in this case 'John Smith'), so the result would be this:
>
>
>Customer       Assign    Type
>------------------------------------------------
>John Smith    (Assign)   VIP
>Mary Kay      (Assign)   VIP
>Ted Johnson   (Assign)   
>Marco Ginn    (Assign)   VIP 
>Ana Karova    (Assign)   VIP
>Uri Juno      (Assign)   
>
>I only added a record for 'Marco' on 'curCustomer_Type' but 'John Smith' also shows VIP even though nothing has been added for him, if I arrow up to make that record disapper and arrow down to make it reappear then it doesn't show 'VIP' for 'John Smith' and everything is fine. Seems like a display problem b/c the data is correct. I've tried refresh,resetting the relationship, skip 0, you name it and I can't get that top record to stop displaying VIP right after adding a record.
>
>Any ideas?
>
>Thanks.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform