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!

Recent content by severach

  1. severach

    double spaces

    * DBLTEST.PRG eliminate large numbers of multiple spaces with the least * number of replace clauses and no _tally loop clos data set talk off erase ("temp.dbf") #define SPLEN 254 create table temp (spaces c(SPLEN)) for m.i=1 to SPLEN-2 append blank repl spaces with "A"+space(m.i)+"B" endfor...
  2. severach

    Foxpro 2.6 for DOS or FP for Windows can run on Windows7?

    Not only are there old programs that still run fine, there are old problems that newer software make so much more difficult that they wouldn't be worth doing any more.
  3. severach

    SELECT not creating array

    SELECT-SQL does not select records with a scope nor does it use relations the way you do so the SET DELETED command is not expected to work with SELECT-SQL. I tried to defeat SET DELETED the way that Fox would with this code: USE FILE && Some deleted records here SET DELETED ON && no longer...
  4. severach

    SELECT not creating array

    The correct solution is to stop using DELETED() and make your own field that does the same thing which will always work with SELECT. SELECT does not handle DELETED() or RECNO() properly, particularly when GROUP BY is present. Try this code on any table to see what I mean: SELECT RECNO() AS...
  5. severach

    Problem with SEEK()

    It's working here. clos data erase ("test.dbf") create table test (zip c(5)) zips='00000,11296,90000,95800,95814,95900,96001,99999' do while len(zips)>0 if ","$zips then zw=left(zips,at(',',zips)-1) zips=substr(zips,at(',',zips)+1) else zw=zips zips="" endif append...
  6. severach

    Append Program

    >The production of the file via SORT or COPY TO is not necessary for this task. It's not necessary. It's usually faster to do what looks like extra work. >Added 3 junk fields to tblPhone My original file is 500 character per record * 300,000 records for 150MB in random order. When I extract...
  7. severach

    Append Program

    >Sorting to another temporary dbf AND creating an index on the fields you sorted on If the Fox team were a bit smarter, SORT+INDEX could have been provided as a single operation which would make it faster without exception. Perhaps SQL subselects already do this. >for sure isn't the fastest...
  8. severach

    Append Program

    None of the provided solutions are fast or organized enough. Relations will handle all details at top speed if you use them right. clos data erase ("temp.dbf") use phone sort on zip,address to temp fields zip,address,phone for not empty(phone) clos data use temp alias source index on...
  9. severach

    Full Screen Size.

    >I thought that Left Alt+Enter interactively causes the screen switch, but does not set it to one mode or the other on a permanent basis for subsequent application launches. Windows 9x, permanent. Windows NT, temporary.
  10. severach

    How to replace char. field with numeric field padded with 0's

    I avoid putting constants into the code like 10 since they are likely to change later. I'd like the code to adapt. REPLACE ALL charfield WITH Padl(ALLTRIM(STR(numfield)), len(charfield), '0') This also makes it obvious that 10 isn't some value picked out of thin air.
  11. severach

    select only not empty fields from 2 databases and copy to a new one

    Is it possible to keep the record count of the two files exactly the same so there is a RECNO() one to one correspondance between files? If so then they are easy to link. clos data use table055 sele 0 use table250 set rela to recno() into table055 With this code, each time you move RECNO() in...
  12. severach

    Database Question

    The above code may work but wouldn't be appropriate if the files are very large. Here is the same thing in high performance code that makes full use of the Fox relational database: set talk on CLOS DATA USE MASTER INDEX ON PHONE UNIQUE COMPACT TO TEMP SELE 0 USE MAIL SET RELA TO PHONE INTO...
  13. severach

    Fox Pro 2.6 to Access

    All my versions of Access will import .DBF files directly with no loss of data. I don't see a reason to involve .XLS.
  14. severach

    Reindex hangs in large dos app

    Using ERASE CLT.CDX will generate an error when CLT.DBF is opened the next time. I find that DELETE TAG ALL accomplishes the same thing without any errors.
  15. severach

    Bug in SECONDS() ????

    Same here with FPD 2.5 and Windows XP SP2. Something I noticed during testing is that Windows does some fancy tricks with the clock for DOS programs. It will only change the time in a DOS window when a program is launched or quit. Norton Commander and FOX both display a clock. If I change the...

Part and Inventory Search

Back
Top