PARADOX COMMON QUESTIONS AND ANSWERS PAL 1. Why do I get "Out of stack space" error? You are doing a recursive call in your script or in your procedures. Somewhere in your scripts, script or proc "A" calls to script or proc "B", then script "B" calls script "A" again. Script "A" is now open twice at different places. This can easily be eliminated by using a WHILE loop around the menu that has script "B" as a choice. This will allow script "B" to return to script "A" and loop to its original position. 2. How can I get the cursor to go from a particular field to another particular field in a WAIT record? In your UNTIL statement in the WAIT RECORD, you can trap for the Enter key (keycode 13) and can intercept the natural movement of the cursor. Then, send the cursor to any position you wish with the MOVETO[Fieldname] command. Use a WHILE loop around the WAIT RECORD so you can return to the WAIT state. 3. How can I get my program to wait for a user to input a value? Use the Accept command. The proper syntax is: @ 0,0 ?? "Input your name please:" @ 1,0 ?? "Press Enter when done." @ 0,25 Accept "A10" TO myname Message "Your name is "+myname sleep 1000 4. Why won't my query with tilde(~) variables find anything when I use wildcard operators? The tilde variable is interpreted as a literal character. Instead of using tilde variables in your QUERY ENDQUERY and a DO_IT!, do a MOVETO[Fieldname] after the ENDQUERY and use the TYPEIN command with the variable. This simulates typing in from the keyboard. Do a DO_IT! after the TYPEIN variablename. 5. When I use AUTOLIB, Paradox never finds the procedures in the second library. What causes this? Check to see if there is a space between the comma and the second library name in the string. Use: Autolib = "utill,util2,main" Not: Autolib = "utill, util2, main" 6. At what value should I set Setswap? Start with Setswap set at 1/2 your available virtual memory. You can find this by doing an <=> in Paradox before starting your program. If the kleftgetm() = 100, then set Setswap to 50,000. You can adjust it throughout your program if you need to. The lower the number, the less room for table images and queries and the more for procedures. 7. I am always running out of memory, how can I avoid this? There are several steps to take to eliminate this problem. Always use procedures instead of playing linked scripts. Keep your procedures small (2K or less) and use Libraries. Use Autolib to load the procedures instead of loading each procedure manually. Use Setswap. Be sure not to run any memory resident programs while your application is running. Check in your AUTOEXEC.BAT and CONFIG.SYS files to ensure that no unnecessary files are being loaded. 8. How can I get a variable into my report? Have your script go into the report generator itself and use the TYPEIN command to place the variable on the report design. Print the report from the generator so you do not save the report with the variable in it. 9. Why doesn't my WAIT TABLE or WAIT RECORD go to all the fields on a multi-table form? It actually does but only within the fields of the current Table. Remember, you have a MULTI-TABLE form up. You need to trap for the or key in your UNTIL statement and explicitly move to those other tables. Use a WHILE loop to return to your WAIT state. 10. When I view a table then place a menu, why can't I see the table? - 2 - Your PAL canvas is covering up the table. Use ECHO NORMAL ECHO OFF after the view but before your menu and you will see the table. - 3 -