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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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

    ...DELETED() or RECNO() properly, particularly when GROUP BY is present. Try this code on any table to see what I mean: SELECT RECNO() AS RNO,COUNT(*) as CT FROM ANYTABLE GROUP BY RNO I get "348,1" 348 times. 348 is the record count of the random table I chose. What may be happening is that...
  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

    ...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 and sort the keys + postable phone numbers to a temporary file, it's 150,000 records *...
  7. severach

    Append Program

    ...file is almost always faster. It could only be slower because of specific conditions of phone.dbf that neither of us know. If phone.dbf is all of * Well ordered on our posting key * Has few fields other than those required for the post * Has few empty phone numbers or other kinds of phone...
  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() ????

    ...of any DOS program gets a consistent clock. set talk off create cursor dummy ( num n(4), tim n(8) ) pa=0 retry=0 for i=1 to 9999 a=int(seconds()*1000) * a<pa, Bad Values shows how often the timer goes below it's previous value on each run * a<=pa ensures unique ascending values...
  16. severach

    Using SELECT to find a social security number in a string

    I read more and noticed you asked for the position of the first numeric character. The same CHRTs will do it. ?POS("0",CHRT(desc,"0123456789","0000000000"))
  17. severach

    Using SELECT to find a social security number in a string

    While CHRTing the characters away and checking the length isn't the best way to do it, it did remind me how I do these things. Dashed SSN: WHERE "000-00-0000"$CHRTRAN(desc,"0123456789","0000000000") SSN surrounded by whitespace WHERE " 000000000 "$"...
  18. severach

    RUN and a memory-hungry program

    Is there a way you can QUIT Foxpro and restart it again with some assistance from a BAT file? Say during the program we create a FOX1.BAT with the command to be run then QUIT Foxpro. If FOX were being run from a BAT file like this one we would run with all available memory then we'd start Fox...
  19. severach

    protected program from copied

    Copy protection is a complicated task. Don't pick a technique that will punish your paying customers.
  20. severach

    open a dbf table and export to excel worksheet

    Even with a newer Foxpro or an older Excel, you can COPY TO <DBFFile> TYPE FOXPLUS TYPE FOXPLUS will produce a DBF file from your existing DBF file without the extra header information that is blocking compatibility.

Part and Inventory Search

Back
Top