Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying
Message
From
17/10/2005 14:25:48
 
 
To
17/10/2005 13:39:31
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01059617
Message ID:
01059668
Views:
11
>The main table is called "proyect"
>"proyect" has the field "number" as the key field
>"number" is used to identify the number of the proyect....
>
>but the thing is that Now There are different types of proyect, There could be...
>
>PS, RC, RDC, RCONC proyects,
>
>for example: PS 0001, or RC 0001, "they can have the same number but different types of proyect"
>PS = Type_P = type of proyect
>0001 = number = number of the proyect
>
>So I made a new field in the table called "Type_P" to put all of these.
>So in the form i can select in a combo box what kind of proyect I am doing, and then add the number.
>
>I also made a table to store the different kinds of proyects so I can relate them in the main table.
>
>
>What I want to do is query a specific Proyect, but I would have to query or search for example if i want to query PS 0001, or PS 0004, or RC 0001
>
>I have to tell the search... to search Proyect type PS and has the number 0001 for example.




Then it seems that either:
m.Type_P = "PS"     && read from combobox
m.Number = "0001"   && read from combobox

* if you have a compound index tag on Type_P + Number
If Seek(m.Type_P + m.Number)
  * found
Else
  * not found
Endif
or for example if you have separate index tags,
this is also Rushmore optimizable:
Select * from Proyect ;
where Type_P = m.Type_P ;
and Number = m.Number ;
Into cursor ResultSet
would do the trick.

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform