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 strongm 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. Joe Crescenzi

    Report layout differs when running

    The only thing that comes to mind is the alignment properties. Positions that are set at design time normally default to left, so the left position is fixed at the place you created them. However items that align right or center may vary a little bit at runtime to reflect the selected...
  2. Joe Crescenzi

    Sorting an array

    As a rule of thumb, when you get an error like that, it's giving you the exact reason for the error, a Data Mismatch Error, so you just need to take a look a data. You only can sort an array if all the values are the same type. In fact, you can even sort an array of logical variables, where...
  3. Joe Crescenzi

    delete having more than 1 count

    As a developer if I could make one change to SQL is that they remove the ability to use the DELETE command without any conditions. The example code from @jedraw is a perfect example of how dangerous it can be. If you accidentally leave out the semicolon that lets FoxPro know there are...
  4. Joe Crescenzi

    delete having more than 1 count

    The HAVING parameter is intended for aggregate functions, so you can't use it like that. Since you seem to be new to SQL Queries, you should avoid using the delete function until you can first successfully do a SELECT with the intended results. For example: SELECT CustNo, count(*) as MyCount...
  5. Joe Crescenzi

    delete having more than 1 count

    BE CAREFUL of lines like that in FoxPro, since you didn't include a semicolon, it will interpret the first line before throwing an error when it reaches the second line. So that first line deletes EVERY row in the table before it reaches the (incomplete) second line.
  6. Joe Crescenzi

    Anyone try using Grok AI to write FoxPro code? It actually works

    In this particular case, I already wrote code to do those 3 types of calculations back in 1990, except back then the function used the fields in an existing table rather than as parameters, so I decided to refactor it so it could be used in other places and with other potential tables and field...
  7. Joe Crescenzi

    Anyone try using Grok AI to write FoxPro code? It actually works

    By the way, it also documented the specific features of the function. Here's what it wrote:
  8. Joe Crescenzi

    Anyone try using Grok AI to write FoxPro code? It actually works

    I've never been impressed by the hype over AI, and until recently every time I've tested AI by asking it to write code, I've never actually been given code that actually works. I did two recent tests to see if Grok could write something that mirrors something simple, then something more...
  9. Joe Crescenzi

    Report not showing selected records

    Another interesting thing is that this odd set of rules is not just for fields and variables, so unless you have exact on or use ==, the order of your comparisons will have a direct impact on the result, so any shorter strings on the right side will only compare that number of characters on the...
  10. Joe Crescenzi

    Report not showing selected records

    A few things come to mind. I'm not sure why you would get ALL the records, but when you compare 2 strings in VFP, especially something that has been trimmed, the default behavior is to only compare up to the length of the string being compared, so you will get a lot more matches. For example...
  11. Joe Crescenzi

    LEDGER PAGE NO.

    All valid points. We often see odd requests from people in these forums from developers who don't explain their question well. Then after we offer them advice or even pseudocode we come to realize they likely are modifying a system that was designed by somebody else years ago who had more...
  12. Joe Crescenzi

    LEDGER PAGE NO.

    I'm less concerned with the performance issues of whether to detect whether it's in preview or not and how many times it may call the function in any given report run. Even if you guarantee the function is called only once per row, they still may run the report another day, so what I was...
  13. Joe Crescenzi

    LEDGER PAGE NO.

    Well said. I will add one warning. Since you intend to run this when you run the report, just keep in mind that when you run your report, as long as you place the function in the detail area it will run one time per row, which could be a problem if your function is inserting rows into your...
  14. Joe Crescenzi

    LEDGER PAGE NO.

    I assume you are not familiar with writing in forums. Capital letters are generally avoided except for occasional emphases, or in the case of FoxPro, they are often used as FoxPro commands, just like in the official documentation. The fact that you felt he was angry when he replied is the...
  15. Joe Crescenzi

    LEDGER PAGE NO.

    This is an odd question. I can't imagine why you would store a page number someplace unless each page has some meaning. For example, if there are 550 rows to print, and each page holds about 55 rows, you would get 10 pages. So, are you saying you want an index that tells you what page each row...
  16. Joe Crescenzi

    HTTP REQUEST ERROR HANDLING

    It looks like a typo, because the top URL starts with a K and it does resolve.
  17. Joe Crescenzi

    Opening and reading from a binary file larger than 2GB

    It bugged me for a while that they discontinued the language when they shifted to .Net, especially since they didn't really introduce an alternative for creating data centric language for desktop apps, which to me was a huge gap in day to day operations in most businesses. Back in the 80s, just...
  18. Joe Crescenzi

    Opening and reading from a binary file larger than 2GB

    "I use VFP for everything I program for myself. My catchphrase is, "Soooooo much easier in FoxPro." I'm guilty of that too. I've coded in xBase since the original CP/M version of dBase II going back to around 1983, so it essentially became my primary language for all sorts of non-database...
  19. Joe Crescenzi

    Opening and reading from a binary file larger than 2GB

    Interesting. Now I'm super curious what you're doing with those comparisons in a database environment. Are you just checking to see IF they're different, and you don't necessarily need to know which bytes were changed? If that were the case, the file size alone would be all you would need to...
  20. Joe Crescenzi

    Opening and reading from a binary file larger than 2GB

    While there's no built-in support for low level functions to do this, the solution will depend on how you want to manage the comparison. If it's a text based file, you can run the FC (File Compare) program built-in to Windows, then send the output to a text file, then you can write something...

Part and Inventory Search

Back
Top