Help! TCursor and UIObject 
Author Message
 Help! TCursor and UIObject

I am trying to create a search and search next button on a catalog
form.  The catalog uses two diferent tables on a 1:1 relationship.  I
do not want to creat a query to generate the catalog because it is too
slow.   I would like to merge these two tables to put the Item
description in whith the primary table but this would cause too much
redesign.  
I want to search for the discription and comments of the secondary
table.  Can I do this by attaching a tcursor to the UIObject
displaying the fields from these two tables on the form.
I have tried this but it does not seem to work.  It would work if all
the fields were in the same table.  My catalog uses a SetGenFilter
based on Item types in the primary table.  I only want to search the
records that are currently being displayed based on the SetGenFilter.
At the present time I am using a tcursor to search the secondayr field
and then researching for the item in the primary table.  There is
probably a simple solution that I am overlooking.

Primary table

ItemCode
ItemType
....Other

Secondary table
Item Code
Description
Comments
...

UIObject on form

Item Code (from Primary)
Description
Comments
...Other

The fields displayed are based on a filter of ItemType.

Any simple solutions would be greatly apprciated.

Best Regards
Randy Fraser



Thu, 07 Oct 1999 03:00:00 GMT
 Help! TCursor and UIObject

Quote:

> I am trying to create a search and search next button on a catalog
> form.  The catalog uses two diferent tables on a 1:1 relationship.  I
> do not want to creat a query to generate the catalog because it is too
> slow.   I would like to merge these two tables to put the Item
> description in whith the primary table but this would cause too much
> redesign.
> I want to search for the discription and comments of the secondary
> table.  Can I do this by attaching a tcursor to the UIObject
> displaying the fields from these two tables on the form.
> I have tried this but it does not seem to work.  It would work if all
> the fields were in the same table.  My catalog uses a SetGenFilter
> based on Item types in the primary table.  I only want to search the
> records that are currently being displayed based on the SetGenFilter.
> At the present time I am using a tcursor to search the secondayr field
> and then researching for the item in the primary table.  There is
> probably a simple solution that I am overlooking.

> Primary table

> ItemCode
> ItemType
> ....Other

> Secondary table
> Item Code
> Description
> Comments
> ...

> UIObject on form

> Item Code (from Primary)
> Description
> Comments
> ...Other

> The fields displayed are based on a filter of ItemType.

> Any simple solutions would be greatly apprciated.

> Best Regards
> Randy Fraser


I don't know how much redesign you would have to do, but the more code
you write against a bad design the harder it will become to redesign it
in the future and the more time you will spend coding around the
problems.  As for this design, I could be mistaken but it appears to me
that your tables may be interchangeable in your data model, allowing
your search on the description and comments fields.

Al Solter



Thu, 07 Oct 1999 03:00:00 GMT
 Help! TCursor and UIObject

Quote:
> I am trying to create a search and search next button on a catalog
> form.  The catalog uses two diferent tables on a 1:1 relationship.

Is this relationship in the form's data model? If so you don't need to
do a thing to have the data from the second table display automatically
when a record is active on the form. Why are you trying to do so much
work?

But in answer to your question a tCursor attached to the table will do
it, though more slowly. Do not use setGenFilter, use tCursor.setRange()
followed by a uiObject.reSync().

Daniel A. Morgan



Thu, 07 Oct 1999 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Help! TCursor and UIObject

2. record locking on Tcursors attached to UIObjects

3. Beginner Paradox Question Re : TableFrames/UIObjects/TCursors

4. Sync TCursor to UIobject

5. TCursors and UIObjects

6. TCursor.Locate() and TCursor.qLocate() both fail

7. Help labels for UIObjects on a form - helplbl.zip [01/01]

8. Help with UIObject Fields Needed

9. HELP Needed with UIObject

10. Array of UIObject - Help Needed

11. HELP--TCursor Problem

12. help: tcursor/resync


 
Powered by phpBB® Forum Software