Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To make a search on the String 1

Status
Not open for further replies.

progfox

Programmer
Jun 15, 2003
43
IN
Dear Sir,

As I have written earlier that I am working on a inventory project. Well Earlier the Raw Material Item Master dbf was made depending on the name of product in which the the item is being used. So after anlysing I found that If a particular Item will be use by say tem products then that particular Item will be entered 10 times. So working in this fashion will increse the size of the dbf and then the processing will get slower and slower.

Now what I want to do is to save the above mentione 10 items in an array and then save it in the dbf. And also I want to search for the particular Items.

So Pls suggest me how can I do this in Fox Pro with the usages.

Thanx & Regards

Chandan


 
Chandon,

First, you cannot directly store an array in a VFP table. The best you can do is to store the information in a memo field. Make each item as separate line within the memo (with CHR(10)+CHR(13) after it). Then, you can either search the memo string using functions such as AT(). Or, better, convert the memo back to an array by using ALINES().

However, I wonder if this is the best way to go about it. Essentially, you have a one-to-many relationship between items and products. That suggests that you should have a separate table for products. Each product record would hold the unique key of the parent item record.

I think you'll find that that will make it much easier to retrieve data.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top