Hi Dan!
Now you can have 2.1 GB *per month* of invoices, correct?
Regards,
Pete
At 09:00 AM 9/23/03 -0700, you wrote: >At 01:11 09/23/03 -0400, Pete Theisen wrote: > >>Now that *is* interesting! Any chance you might post the search code? >Pete: > >Pretty simple, really. I won't post all the greasy details, but so you can >see what I'm doing. History files are all in one directory, name is of the >form "INV0301.dbf", containing invoices for January 2003. >---------------------- >*-- Get a list of history files by date, newest first >private aFiles, Nfiles >Nfiles = adir(aFiles, 'ORDHIST\*.dbf') >if Nfiles = 0 > do MsgBox with "No .dbf files in ORDHIST directory" > return >endif > >wait window str(nfiles,3)+' history files' nowait >*-- Make aFiles ordered by file date descending >create cursor HistFiles (FNAME C(12), FSIZE N(10), FDATE D) >select HistFiles >append from array aFiles >index on FDATE descending tag FDATE >copy fields FNAME to array aFiles >use > >*-- now search for the Invoice number >Minv = AskUserForInvoiceNumber() >for N = 1 to Nfiles > Dbname = 'ORDHIST\' + aFiles[N, 1] > wait window "Searching "+Dbname nowait > use (Dbname) > *-- If files are on a server, index them and use seek > locate for INVNO = Minv > if not found() > loop > endif > do WhateverYouWantTo > exit >endfor > >return >*------------------------------- >You get the idea. You really want to do this on the machine where the >files are if using locate. Otherwise, index them and use seek. > >Dan Covill > > > [excessive quoting removed by server]
©2003 Pete Theisen |