Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bionet!ames!uhccux!munnari.oz.au!comp.vuw.ac.nz!dsiramd!csnz!paul From: paul@csnz.co.nz (Paul Gillingwater) Newsgroups: comp.databases Subject: Re: foxbase problem, need help Message-ID: <85@csnz.co.nz> Date: 3 Aug 89 22:56:27 GMT References: <20900010@silver> Reply-To: paul@csnz.co.nz (Paul Gillingwater) Organization: Computer Sciences of NZ Limited Lines: 28 In article <20900010@silver> tsui@silver.bacs.indiana.edu writes: >Hello everybody! > I have to locate records according to arbitrary number of fields in the >database, the database is decomposed into several files to avoid redundency. >Everything looks fine... but sometimes it crashes with a message: >line too long. The problem is that the user input can be very long, >something like a string of length 60, and the MAXFIELDS is upto 12... >FOXBASE+ 2.01 (?) single user, runing on an AT. >--yufeng >tsui@silver.bacs.indiana.ede I solved this problem for dBase III in London a few years ago. I still have the source, which I am happy to post to those who would like it. Basically what it does is build a customised procedure by outputting code to a text file, then executing the code. The procedure output by the program consists of a series of tests that cause it to exit with a status flag set to failed unless it gets past the last IF. Since you can't assume that any field is indexed you have to do a sequential search, then call the procedure for each record. I tried to solve it using the macro approach as well, but ran into the 255 byte command limitation problem, because of user input and an arbitrary number of fields available for searching. -- Paul Gillingwater, Computer Sciences of New Zealand Limited Bang: ..!uunet!dsiramd!csnz!paul Domain: paul@csnz.co.nz Call Magic Tower BBS V21/23/22/22bis 24 hrs +0064 4 767 326