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 derfloh 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

    SELECT SQL and free tables

    In summary, your problem is not a question of whether your SQL SELECT is failing because you are using free tables vs a database container. Your problem is understanding the syntax of the JOIN condition. ...JOIN ON TableName1.FieldName1 = TableName2.FieldName2. As mentioned earlier, you...
  2. Joe Crescenzi

    SELECT SQL and free tables

    When a SQL command is run against 2 or more tables, you have to ensure each field / column is unique so the parser knows which one you are referring to. So, if a field exists in both tables, you need to specify the table or alias every time you use it, not just in the column list as you showed...
  3. Joe Crescenzi

    SELECT SQL and free tables

    If your SELECT commands are not working, it's because VFP can't find your tables, so you can either configure a path or open the tables before calling the SELECT. Technically, you can also include the path in the SELECT (SELECT * from MyFolder\MyTable), but that's bad code.
  4. Joe Crescenzi

    Is there an equivalent of "AfterRowColChange" in Listbox control?

    100% correct. ProgramaticChange is another important variation on potential triggers. I just wanted to let the Rajesh know the primary reason they are not exactly interchangeable and why there is no AfterRowColChange event in a ListBox because there are no rows or columns. As you said, a grid...
  5. Joe Crescenzi

    Is there an equivalent of "AfterRowColChange" in Listbox control?

    The interesting point about AfterRowColChange is what "Change" means. It's not necessarily the value of a row or column that changed, but that your physical navigation position changed. When you scroll through a Grid, your focus moves from row to row (record to record in a table or cursor), or...
  6. Joe Crescenzi

    Is there an equivalent of "AfterRowColChange" in Listbox control?

    For the record, InteractiveChange isn't the same as AfterRowColChange because it's only triggered when the control is changed, not when a row changes, but in your case, you said you wanted it to trigger when the user scrolled the values in the control. The nice benefit of this is that those...
  7. Joe Crescenzi

    Combobox not populated with array

    I was referring to adding the REFRESH() directly after the code you use to add the items to the control.
  8. Joe Crescenzi

    Combobox not populated with array

    Just a thought. I didn't read the whole thread, but if the control is completely empty, perhaps you also need to add a REFRESH(). Even with the wrong parameters for the array elements, it wouldn't be empty. You'd see numbers or even a bunch of blank lines.
  9. Joe Crescenzi

    Window displaying differently outside VFP environment

    Since every user can have different screen dimensions and resolutions, it's best to design user interfaces with forms and avoid absolute screen coordinates entirely. Forms can make things quite a bit easier, but we still need to be mindful of whether they will fit on a user's screen and what...
  10. Joe Crescenzi

    Window displaying differently outside VFP environment

    I agree, if it's a new project, so I assume he is trying to just maintain something written before Windows, so there are a bunch of @ SAY/GET or ? lines. As for me, I still define Windows from time to time when I want a BROWSE window or a REPORT FORM to take up a specific space.
  11. Joe Crescenzi

    Window displaying differently outside VFP environment

    As a rule of thumb, I don't define windows using absolute coordinates for both dimensions, especially when they're on the screen because the FROM and TO coordinates are dependent on the font size of the screen itself. So, to ensure the window is large enough for whatever you are putting into it...
  12. Joe Crescenzi

    website URL validation in a text box

    ...RunPowerShellRegex(tcInput, tcPattern) LOCAL lcCmd, lcOutputFile lcOutputFile = "C:\temp\regex_result.txt" && Path for output * Construct PowerShell command string lcCmd = 'powershell -command "$input=\'' + tcInput + '\'; $pattern=\'' + tcPattern + '\'; if ($input -match...
  13. Joe Crescenzi

    website URL validation in a text box

    The Swiss Army Knife is definitely the better tool, by a wide margin. That said, since the original request was for a potential RegEx solution, it's potentially more than the OP needed. I've used similar approaches to validate just email addresses, where I need not know if the mailbox exists...
  14. Joe Crescenzi

    website URL validation in a text box

    Valid points. I'd be more inclined to use your suggestion of IsValidURL to just confirm the formatting, but the bored developer inside of us finds it fun to build something that does more than it needs to. It's like asking an engineer to make a flathead screwdriver and they build you a Swiss...
  15. Joe Crescenzi

    website URL validation in a text box

    That's probably all that's needed. If Ravi's goal was just knowing a URL is formatted correctly, the function should return true even if the domain doesn't even exist.
  16. Joe Crescenzi

    website URL validation in a text box

    It's not up to me, it's up to the OP. Remember, all Ravi asked for is validating that it's a valid URL format. If that's the only criteria, even a redirected, unavailable, or Bad Gateway means the URL was formatted correctly.
  17. Joe Crescenzi

    website URL validation in a text box

    ...the potential to speed it up if the URL returns a lot of data. My only suggestion is that if the main objective is knowing if the URL is good, I wouldn't return loException.Message, I'd make it a consistent value such as "* INVALID *", or simply return .T. for a 200, and .F. for any exception.
  18. Joe Crescenzi

    website URL validation in a text box

    ...Here's an example that definitely works. It reads the data, and returns whatever's in it. If it's blank, there's nothing there, it will return "* INVALID URL *", or you can make it return whatever you prefer, otherwise it will return the contents of the URL (assuming the URL is supposed to...
  19. Joe Crescenzi

    How to supply filename when doing SET PRINTER TO NAME "Microsoft Print to PDF"

    As I mentioned, I use XFRX these days, but as far as I know it will just follow whatever dimensions are in the report file. They have a free version, so give it a try and you may not need to explore other options. That said, I've been using XFRX for decades and it's never let me down. What...

Part and Inventory Search

Back
Top