Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Relation and Grid problem
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01424955
Message ID:
01424956
Views:
61
Is there any way of you using a Cursor Adapter or Local View instead of tables with relations?

I've seen here problems similar to what you have described.

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform