Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record order in child grid
Message
From
10/05/2001 09:18:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/05/2001 23:22:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00505624
Message ID:
00505718
Views:
20
>I have a 1 to many form. In the child table, I have a field = STR(parent.id,8)+STR(no,2). The field is indexed to control the order of child record in the grid.
>
>In order to use this pratice, I need to SET EXACT OFF.
>
>This will cause a problem when I need to find record by using INDEXSEEK(). I need to SET EXACT ON before run the command, and then set it back to OFF.
>And the most serious is the grid will no funtion properly after all.
>
>Can anyone give me some idea to solve the problem? Any other idea to control the order of child grid??
>
>TIA.

You don't need set exact on/off for indexseek(). Match your expression to index key. ie : if tag key was lastname,
indexseek(padr(lcExpr,fsize('lastname','mytable')),.F.,'myTable','myTag')
would simulate an 'exact on' indexseek.
Also instead of str(parent.id,8)+str(no,2), bintoc(parent.id)+bintoc(parent.no) sounds to be better IMHO. If need be create a separate tag for parent.id.
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