home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / databases / paradox-faq < prev   
Encoding:
Text File  |  1995-07-25  |  29.1 KB  |  823 lines

  1. Subject: comp.databases.paradox FAQ TEST
  2. Newsgroups: comp.databases.paradox,comp.databases,comp.answers,news.answers
  3. From: ryee@clark.net (Roger L. Yee [DSi group])
  4. Date: 11 Oct 1994 04:02:10 GMT
  5.  
  6. Archive-name: databases/paradox-faq
  7. Posting-Frequency: monthly
  8. Last-modified: 1994/10/10
  9. Version: 2.2a
  10.  
  11. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=--=-=-=-=-=
  12.  
  13.              P  A  R  A  D  O  X
  14.  
  15.                 F A Q
  16.  
  17.      Frequently Asked Questions for comp.databases.paradox
  18.  
  19.  
  20.                         version 2.2a, 10/10/94          
  21.  
  22.                             Maintained by:
  23.                   J. Allen Dove (adove@dsigroup.com)
  24.                    Roger L. Yee (ryee@dsigroup.com)
  25.                
  26.     DISTIRBUTE FREELY. COMMERCIAL DISTRIBUTION PROHIBITED. 
  27.          
  28.      Comments, Suggestions, Additions, Updates to: dev@dsigroup.com 
  29.  
  30. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=--=-=-=-=-=
  31.  
  32.  
  33. CONTENTS
  34. --------              * denotes NEW or UPDATED items
  35.  
  36. 1.0 INTRODUCTION
  37.      1.1 Comp.databases.paradox Netiquette
  38.      1.2 Administrivia
  39.    * 1.3 Maintainers' Note
  40.  
  41. 2.0 PARADOX SUPPORT
  42.      2.1 Borland Phone Services    
  43.      2.2 Borland Online Services   
  44.      2.3 Other Online Services
  45.      2.4 Other FTP Archives
  46.    * 2.5 FAQ Updates
  47.  
  48. 3.0 Paradox-related publications
  49.  
  50. 4.0 FREQUENTLY ASKED QUESTIONS
  51.      4.0 Why isn't there a separate news group for DOS and
  52.      Windows?
  53.      4.1 How do I do a not-in query? [DOS, WIN]
  54.      4.2 How do I make a generic query that can be used with
  55.      several tables?[DOS, WIN]
  56.      4.3 Where is the Paradox for Windows Runtime? [WIN]
  57.      4.4 How does Paradox round numbers? [DOS]
  58.      4.5 How can I delete an arbitrary file? [DOS]
  59.      4.6 Why is Paradox for Windows so darn slow? [WIN]
  60.      4.7 How do I query for the top/bottom 5 records? [DOS, WIN]
  61.      4.8 How do I send reports to a text file? [WIN]
  62.      4.9 How do I get Paradox/Win running on OS/2? [WIN]
  63.      4.10 How do I access calculated fields? [WIN]
  64.      4.11 How do I create calculated fields [DOS, WIN]
  65.      4.12 How to I prevent Ctrl-Break? [DOS]
  66.      4.13 Why didn't my variable query work? [DOS,WIN]
  67.      4.14 How do I restrict input to upper-case only? [DOS,WIN]
  68.      4.15 How do I auto-number a field for ID's?
  69.      4.16 When should I use a filter (Order/Range) vs. Query?[WIN]
  70.      4.17 Why can't I open the table? [DOS,WIN]
  71.      4.18 What are these *&!# files doing here? [DOS]
  72.      4.19 Where's the arrive trigger? [DOS]
  73.      4.20 How do I get the disk drive letters? [DOS]
  74.      4.21 Why can't I change data on a detail table? [WIN]
  75.      4.22 Where did that table come from, and where did it go?
  76.       [DOS,WIN]
  77.    * 4.23 What is the current version of Paradox? [DOS,WIN]?
  78.  
  79.   5.0 PARADOX 3rd PARTY PRODUCT DIRECTORY
  80.  
  81. -----------------------------------------------------------------
  82.  
  83. 1.0 Introduction
  84. Welcome to the comp.databases.paradox FAQ. This document attempts to 
  85. answer frequently asked questions regarding the Paradox product and 
  86. related topics. Your contributions are necessary for this document 
  87. to be useful. Please send any information you think is 
  88. needed for or useful to this document to the FAQ address at:
  89.   dev@dsigroup.com
  90. or post to the Usenet news group comp.databases.paradox.
  91.  
  92. 1.1 Comp.databases.paradox Netiquette
  93. When posting to comp.databases.paradox, please specify in your
  94. article subject either [DOS] or [WIN], if your question is
  95. specific to one version or the other.  Some subjects, such as
  96. queries, data formatting, etc., etc. will obviously apply to
  97. both.  If you are using a version other than the current versions
  98. (4.5 for both DOS and Windows), specify that also, for instance
  99. "[DOS35] Wait Processing".
  100.  
  101. If you are cross-posting this article to other groups, such as
  102. comp.databases or comp.os.mswindows.developer, please specify
  103. PARADOX or PDX in the subject, so they'll know what the heck
  104. you're talking about.
  105.  
  106. If you include code examples in your message, please check to
  107. make sure they work.  If it isn't tested exactly as written,
  108. please at least say so *AHEAD* of the code.  If it is something
  109. someone asked for, and you aren't sure your method works for him,
  110. try e-mailing to him first, to hammer out the specs, then one of
  111. the two of you can post the real answer.
  112.  
  113. 1.2 Administrivia
  114. Paradox is a registered trademark owned by Borland International,Inc.
  115. MS-Windows is a registered trademark owned by Microsoft Corporation.
  116. Other product and corporate names may be trademarks of other companies, 
  117. and are used only for explanation and to the onwers' benefit, without 
  118. intent to infringe.
  119.  
  120. This document is not an official document of or endorsed by Borland
  121. International, Inc.
  122. ---------------------------------------------------------------------
  123. Copyright (c)1994 DSi group. This collection of Paradox information 
  124. is a publication of the DSi group. Redistribution is hereby granted in
  125. electronic format if document is unaltered or modified and all notices
  126. remain intact. Commerical distribution is prohibited.
  127. ---------------------------------------------------------------------
  128.  
  129. 1.3 Maintainers' Note
  130.  
  131. An update for the FAQ is LONG OVERDUE - we are working rapidly to update
  132. the FAQ to reflect changes in version 5.0 This FAQ has not changed since
  133. the last posting, hence version 2.2a. Look for the updated FAQ to be
  134. posted and released shortly. A Developer's FAQ for OPAL will be released
  135. shortly also. Look for announcements soon. 
  136.  
  137. Once again, thank you for your input in compiling this 
  138. FAQ. As always any and ALL response is welcomed!
  139.  
  140. Thanks in advance.
  141.  
  142. J. Allen Dove            Roger L. Yee
  143. FAQ Co-Maintainer        FAQ Co-Maintainer
  144. DSi group                DSi group
  145. adove@dsigroup.com       ryee@dsigroup.com
  146.  
  147. *****************************************************************
  148.  
  149. Special Thanks to Joel Finkle, the original founder of the FAQ
  150.  
  151. Thanks is given to the following contributors:
  152.  
  153. Mean Green Dancing Machine (aahz@netcom.com)
  154. Dean Bowes (bowesd@thomas.ge.com)
  155. Nasir Ahmed Noor (ummalik@ccu.umanitoba.ca)
  156. Reinoud van Leeuwen (Leeuwen@rullf2.LeidenUniv.nl)
  157. Bill Chosiad (billc@world.std.com)
  158. Stuart Tomares, M.D. (stomares@welchlink.welch.jhu.edu)
  159. Carey Klenetsky (carey@limax.com)
  160. Jeff Stevens (stevens@sirius.scubed.com)
  161. Joseph Bentley (joe@slick.limax.com)
  162. Ken Ostrin (ken@limax.com)
  163. Krzysztof Zmudzinski (krystof@cs.washington.edu)
  164. Donald R. Oddy (donald@grove.demon.co.uk)
  165. Matthew McDermott (mcs@ucsco.ucsc.edu)
  166. Joe Humphreys (joe.humphreys@ggcs.org)
  167.  
  168. Thanks to the DSi group for providing Internet network and related 
  169. resources for this endeavor.
  170.  
  171. -----------------------------------------------------------------
  172.  
  173. 2.0 Paradox Support
  174.  
  175. 2.1 Borland Phone Services
  176. Recently, Borland abandoned free human-moderated telephone
  177. support, as did much of the computer industry.  They do provide a
  178. number of means for support, though.
  179.  
  180. TechFAX        1-800-822-4269
  181. This has touch-tone menus to send answers to common questions to
  182. your FAX machine
  183.  
  184. Automated Support:  1-800-524-8420
  185. This has touch-tone menus for recorded answers to common
  186. questions
  187.  
  188. Advisor Line:       1-900-555-1000 Paradox DOS
  189.             1-900-555-1006 Paradox Windows
  190. $2.00 per minute, first minute free
  191.  
  192. Credit Card Advisor 1-800-468-9990 Paradox DOS
  193.             1-800-452-1333 Paradox Windows
  194. $2.00 per minute, first minute free, VISA, MasterCard, American Express
  195.  
  196. Other Borland Phone Numbers:
  197. Product Registration     1-800-845-0147
  198. Order Line               1-800-331-0877
  199.  
  200. 2.2 Borland On-Line Support
  201.  
  202. FTP                      ftp.borland.com {NEW}
  203. CompuServe               GO BORLAND
  204. BIX                      JOIN BORLAND
  205. GEnie                    BORLAND
  206. Borland Download BBS     1-408-439-9096
  207. Automated Support BBS    1-408-431-5250
  208.  
  209. 2.3 Other On-Line Services
  210. Usenet                   comp.databases.paradox
  211. Digest of c.d.paradox    *is this still working?*
  212. Paradox Informant BBS    1-916-686-4740
  213.  
  214. Paradox and PDOXWIN Mailing lists:
  215.  
  216. Send mail to LISTSERV@BRUFPB.BITNET
  217. In the body of the message, with no header, type
  218.  
  219. SUB PARADOX (your full name)
  220.  
  221. or
  222.  
  223. SUB PDOXWIN (your full name)
  224.  
  225. To post to these lists, mail to PARADOX@BRUFPB.BITNET or
  226. PDOXWIN.BRUFPB.BITNET.
  227.  
  228. PDOXWIN does not appear to be active.  PARADOX receives about
  229. five messages per week.
  230.  
  231. 2.4 Other FTP Archives
  232. ftp.cica.indiana.edu at Indiana University maintains a Paradox
  233. archive in /pub/pc/borland/pdx.  There are subdirectories labeled
  234. dos, wind and ti, the latter containing Borland's Technical
  235. Information notes, also found on the Borland Download BBS.
  236.  
  237. BrainLINK BBS/FTP System
  238. This is a FTP/TELNET site that has a number of Paradox related files for 
  239. both DOS and WINDOWS versions.
  240. TELNET/FTP to:  199.184.242.4
  241. Rajesh Goel is the owner - frostbit@dorsai.dorsai.org
  242.  
  243. 2.5 FAQ Requests
  244. To obtain the latest copy of the FAQ via mail-server, 
  245. send e-mail message to:
  246.   dev@dsigroup.com
  247.   Subject line containing: GET PDOX FAQ
  248.   Message Body: <ignored>
  249.  
  250. The FAQ is updated and cross-posted monthly to the following newsgroups:
  251.   comp.databases.paraodx
  252.   comp.databases
  253.   comp.answers
  254.   news.answers
  255.  
  256.  
  257. -----------------------------------------------------------------
  258.  
  259. 3.0 Paradox-related Publications
  260.  
  261. 3.1 Paradox Developer's Journal
  262.      Published monthly by the Cobb Group
  263.      1-800-223-8720 or 502-491-1900
  264.  
  265.      Customer Relations
  266.      9420 Bunsen Pkwy, Suite 300
  267.      Louisville, KY 40220
  268.      Internet: JEFF_DAVIS@MM.COBB.ZIFF.COM
  269.  
  270.      Subscriptions <as of 1/94> $79/yr or $99/yr outside of U.S.
  271.      Resource Disks $49/yr, $29/6 mo., $9.95 per issue
  272. Typically 16-20 pages, containing both Windows and DOS
  273. information. Targeted at developers, contains PAL and ObjectPAL
  274. code information.
  275.  
  276. 3.2 Paradox User's Journal
  277.      Published monthly by the Cobb Group
  278.      1-800-223-8720 or 502-491-1900
  279.  
  280.      Customer Relations
  281.      9420 Bunsen Pkwy, Suite 300
  282.      Louisville, KY 40220
  283.      Internet: JEFF_DAVIS@MM.COBB.ZIFF.COM
  284.  
  285.      Subscriptions <as of 1/94> $79/yr or $99/yr outside of U.S.
  286.      Resource Disks $49/yr, $29/6 mo., $9.95 per issue
  287. Typically 16-20 pages, containing DOS-only Paradox information. 
  288. Mostly aimed at users of Paradox, including form and report
  289. design, simple scripts, queries.
  290.  
  291. 3.3 Paradox for Windows Journal
  292.      Published monthly by the Cobb Group
  293.      1-800-223-8720 or 502-491-1900
  294.  
  295.      Customer Relations
  296.      9420 Bunsen Pkwy, Suite 300
  297.      Louisville, KY 40220
  298.      Internet: JEFF_DAVIS@MM.COBB.ZIFF.COM
  299.  
  300.      Subscriptions <as of 1/94> $79/yr or $99/yr outside of U.S.
  301.      Resource Disks $49/yr, $29/6 mo., $9.95 per issue
  302. Typically 16-20 pages, containing Windows-only Paradox
  303. information.  Mostly aimed at users of Paradox, including form
  304. and report design, simple scripts, queries.
  305.  
  306. 3.4 Paradox Informant
  307.      Published Monthly by Informant Communications Group
  308.      916-686-6610
  309.  
  310.      10519 E. Stockton Blvd, Suite 142
  311.      Elk Grove, CA 95624-9704
  312.      CompuServe: Jerry Coffey 70304,3633, MCI mailbox JCOFFEY
  313.  
  314.      Subscriptions: <as of 1/94> $44.95, Canada $49.95, 
  315.      Central/South America $75,All Others $115.
  316.  
  317. Typically 80-92 pages, containing everything from basic tutorials
  318. to in-depth technical articles.  Excellent magazine.  Maintains
  319. the Paradox Informant BBS (PIBB) listed above.
  320.  
  321. 3.5 Data Based Advisor
  322.      Published Monthly by Data Based Solutions, Inc
  323.      800-336-6060 or 619-483-6400
  324.  
  325.      4010 Morena Blvd. Suite 200
  326.      San Diego, CA 92117
  327.      CompuServe 70007, 1614; MCI Mailbox DATABASED
  328.  
  329.      Subscriptions <as of 06/94> $35/yr, Canada $55, Others $75
  330.      Index of articles available on disk for $17.49
  331. Covers most of the personal-computer-based Database world.  Good
  332. articles on Paradox are common.
  333.  
  334. 3.6 Instant Scripts
  335.      Published by LAPALS, the Southern California 
  336.      Paradox Users Group
  337.      310-541-3461
  338.  
  339.      4009 Montaigne Way
  340.      Palos Verdes, CA 90247
  341.      Annual Membership $45, International $120.  
  342.      Make checks payable to Nancy Chalnick, LAPALS Membership Director.  
  343. Sample issues available. High quality articles on Paradox.
  344.  
  345. -----------------------------------------------------------------
  346.  
  347. 4.0 Frequently Asked Questions
  348.  
  349. Why isn't there a separate news group for DOS and Windows?
  350.  
  351. You need a large number of people to authorize a NEW news group.  
  352. Besides, there's still a good number of messages that are useful for both 
  353. DOS and Windows users (see below).  However, if there is enough response, 
  354. there will be two FAQs: one covering general techniques and questions on 
  355. DOS and Windows  and a developer's version targeting specifically Paradox
  356. for Windows/ObjectPAL application development.
  357.  
  358. Sharing platforms is not uncommon in other newsgroups, for
  359. instance, rec.games.video.sega discusses GameGear, Genesis, etc.
  360.  
  361. 4.1 How do I do a not-in query? [DOS, WIN]
  362. With two tables with a common key, (for instance, Customer ID),
  363. how do I find which records in one table have no matches in the
  364. other (for instance, customers with no orders)?
  365.  
  366. Create a Paradox Query (.SC for DOS or .QBE for Windows) that
  367. looks like this:
  368.  
  369.      CUST | Customer ID  | Address | City    | State   |
  370.       | Check _Cust! | Check   | Check   | Check   |
  371.  
  372.      ORDER     | Customer ID       | Order Num    |
  373.            | _Cust, count = 0  |              |
  374.  
  375.      ORDER     | Order Date   | Total Cost   |
  376.            |              |              |
  377.  
  378. This will find those customers who haven't placed an order.  To
  379. expand this method, put "> 1/1/94" in the Order Date (without the
  380. quotes), this will find those customers who haven't ordered this
  381. year.
  382.  
  383. This works because queries execute their operations in the
  384. following sequence:
  385.  
  386. * Search for actual values or ranges
  387. * Join tables
  388. * Execute aggregators
  389.  
  390. Because the COUNT gets done *after* the join, it removes records
  391. from ANSWER that do not have a corresponding record in Customer
  392. ID.
  393.  
  394. 4.2 How do I have a generic query that can be used with several
  395. tables? [DOS,WIN]
  396.  
  397. In Paradox for DOS, you don't.  Query expressions can not use
  398. variables for table names.  In Paradox for Windows, you may use
  399. something like:
  400.  
  401.      ~strTblName    | Patient ID   | Age     |
  402.             | Check        | > 65    |
  403.  
  404. The best you can do with Paradox for DOS is either:
  405. a) Copy or Rename your table to the generic table name used in
  406. your query, or 
  407. b) Use 'scripting' commands to create the Query on the fly. 
  408. Borland cautions that you must ensure proper naming of variables
  409. and tables.  A good method is to begin by recording an instant
  410. script (F3), and replacing table names with variables.
  411.  
  412.      MENU {ASK} SELECT TheTable 
  413.      MOVETO [Patient ID] CHECK 
  414.      MOVETO [Age] TYPEIN "> 65"
  415.  
  416. 4.3 Where is the Paradox for Windows Runtime? [WIN]
  417. Borland is finally selling this for version 4.5.  See the order
  418. line phone number above.
  419.  
  420. 4.4 How does Paradox round numbers? [DOS, WIN]
  421. Paradox uses Banker's Rounding.  This has been found to be
  422. extremely annoying to many people. Banker's Rounding rounds a 5
  423. digit to the nearest even number.  So, ROUND(123.45,1) goes to
  424. 123.4, but ROUND(123.55,1) goes to 123.6! (Paradox for Windows
  425. uses the expression variable.Round (digits) for rounding, and
  426. does not seem to 'suffer' from banker's rounding).
  427.  
  428. Note that the FORMAT() function uses mathematical rounding:
  429.      NUMVAL (FORMAT("W10.1",123.45)) returns 123.5.
  430.  
  431. 4.5 How can I delete an arbitrary file? [DOS]
  432. The most obvious method is to use
  433.      RUN [NOREFRESH] "DELETE "+TheFile
  434. If you have multiple files to delete, you may want to create a
  435. .BAT file and execute that, as the RUN command is somewhat time
  436. consuming.
  437.  
  438. Another method is to create a new file of the same name using the
  439. Editor, and not save it.  This deletes the original file.  It
  440. will not work properly for non-textual files such as .EXE, .COM
  441. or .SC2.  But it's a neat trick, worth looking at, and faster
  442. than RUN, by as much as 25 times.
  443.  
  444. (Requires version 4.5):
  445.  
  446.      EDITOR NEW TheFile                 ; Create a new file
  447.      WINDOW HANDLE EDITOR TO AHandle    ; Get the window handle
  448.      WINDOW SELECT AHandle              ; Select the window
  449.                     ; (twice in case
  450.      WINDOW SELECT AHandle              ; of floating windows)
  451.      WINDOW CLOSE                       ; Close without saving
  452.  
  453. Remember not to delete Paradox components using this method
  454. (tables, indexes, forms, reports, etc. etc.) as Paradox may still
  455. have them open, or expect them to be there later.
  456.  
  457. 4.6 Why is Paradox for Windows so darn slow? [WIN]
  458.  
  459. Borland requires at least 4MB of memory, but recommends 6MB, on
  460. your Windows system for adequate performance.  In truth, Paradox
  461. runs "acceptably" with 4 meg on a fast 486, but that's still not
  462. optimally.  For any moderately complex database, you will want at
  463. least 8MB, especially on 386 processors.  Paradox for Windows is
  464. just such a powerful beast that you more or less insult it by
  465. offering up any less.
  466.  
  467. One difference between DOS and Windows Paradox is that the
  468. Windows version does case-insensitive searching with the Locate
  469. command.  This can be removed by checking the Case Sensitive
  470. check box on the Locate command (Ctrl-Z).  This makes you have to
  471. be more careful, but it's several times faster.  Also, if you
  472. find you are doing frequent searches on a non-key field, create a
  473. maintained secondary index on that field.  This should also help
  474. locate speeds.
  475.  
  476. 4.7 How do I query for the top/bottom 5 records? [DOS, WIN]
  477.  
  478. This looks rather strange, and can be time consuming, but will
  479. select the records with the five highest values in a table:
  480.  
  481.      QUERY
  482.  
  483.      TEST | Order        | Total Invoice  |
  484.      SET  |              | _a             |
  485.      SET  |              | <max _a,_b     |
  486.      SET  |              | <max _b,_c     |
  487.      SET  |              | <max _c,_d     |
  488.      SET  |              | <max _d,_e     |
  489.       | Check        | Check >=max _e |
  490.  
  491. ENDQUERY
  492.  
  493. It works by asking on each line to find a set of records less
  494. than the greatest value in the previous set.  When you get to _e,
  495. you've defined a set missing the four highest Invoice records. 
  496. The last line selects records greater than or equal to that set,
  497. thus finding the five greatest records.
  498.  
  499. 4.8 How do I send reports to a text file? [WIN]
  500.  
  501. Using the Windows Control Panel Printer icon, create a
  502. Generic/Text printer, and use the Connect button to specify
  503. FILE:.  You can then print your reports to this printer, and you
  504. will be asked to specify a file.   Note that only
  505. non-proportional fonts (such as Courier, System), and only text
  506. will appear in the report.
  507.  
  508. 4.9 How do I get Paradox/Win running on OS/2? [WIN]
  509. Borland has a Technical Information Document called
  510. "Configuration Issues of  Running P4W under OS/2 v2.1.  It is
  511. available from the Borland Download BBS and ftp.cica.indiana.edu
  512. as TI1674.ZIP, and from Borland Tech FAX as number 1674. 
  513. See above for how to reach these sources.
  514.  
  515. 4.10 How do I access calculated fields? [WIN]
  516. For example, an ANSWER table created by a query has a field
  517. called "Sum of Amount".  How do I access this in my methods?
  518.  
  519. If you had created a form object yourself, the default name for
  520. this field would have been MyT.Sum_Of_Amount.  However, because
  521. this is just a table field, you must use MyT."Sum of Amount". 
  522. Looks strange, but it's the right way to do it.
  523.  
  524. 4.11 How do I create calculated fields [DOS, WIN]
  525. A table can't have an auto-calculated field, unfortunately.  What
  526. can you do?
  527.  
  528. a) A form or report can have a field calculated from other
  529. fields, and a limited number of functions.
  530. b) Your WAIT procedure can look for a POSTRECORD trigger, and
  531. calculate a field in  your table there (Windows folks need to
  532. trap the correct Action).
  533. c) A query can update a field with the CHANGETO command, or
  534. create a new field with the CALC command.
  535. d) Use a SCAN loop
  536.      SCAN
  537.     [That Darn Field] = [Another Field] * 10
  538.      ENDSCAN
  539.  
  540. For Windows, use
  541.      SCAN MyTCursor:
  542.     MyTCursor.That_Darn_Field = MyTCursor.Anotherfield * 10
  543.      ENDSCAN
  544.  
  545. 4.12 How to I prevent Ctrl-Break? [DOS]
  546. At first, it would appear that the "Disable Break" command in the
  547. Custom Configuration Utility would be the solution.  However,
  548. documentation indicates that this feature is solely to prevent
  549. erroneous breaks that can be generated by some European
  550. keyboards.
  551.  
  552. The solution to preventing breaks is to password-protect the
  553. highest-level script that you wish to keep from 'break'-ing.  All
  554. routines called by this routine will prevent breaks.
  555.  
  556. 4.13 Why didn't my variable query work? [DOS,WIN]
  557. Using Tilde Variables in Paradox Queries provides quite a bit of
  558. power to have a query that is changeable at run-time.  However,
  559. there are a few restrictions.
  560.  
  561. Example Query:
  562.  
  563.      Table| Customer     | Name    | State        |
  564.       | Check        | Check   | ~strState    |
  565.  
  566. a) strState must be a *string* variable.  Even for numeric or
  567. date fields, strState must be a string expression that is
  568. inserted into that spot on the query table.
  569. b) strState is the criteria, not the whole shebang that would go
  570. in the field. In other words, it behaves as if it were typed in
  571. enclosed in parentheses, so commas, underbars, ORs, etc. etc. are
  572. not processed.
  573.  
  574. 4.14 How do I restrict input to upper-case only? [DOS,WIN]
  575.  
  576. The Picture for a field or ACCEPT can be set to "*&" for
  577. all-uppercase, letters-only, or "*!" for all-uppercase, any
  578. characters.  In Windows, for more information see the on-line
  579. help and search for "Picture String Characters".
  580.  
  581. 4.15 How do I auto-number a field for ID's?
  582. You will need to trap for new record insertion (TriggerType =
  583. INSRECORD in DOS 4.5 WAIT procedures, eventInfo.Id () =
  584. DataInsertRecord in Windows Action method).
  585.  
  586. You can then calculate the next available value as:
  587.  
  588. DOS: [RecordID] = CMAX(TABLE(),[RecordID])
  589. WIN: RecordID = CMAX(TheTable.CMAX(RecordID))
  590.  
  591. ***Remember, if you use column operators, the method will try to
  592. place a WRITE lock on the table.  This is usually ineffective in
  593. a multiuser environment as other will need more than just read
  594. permissions and you may not get the lock.
  595.  
  596. An better method that can be used in multi-user environments is
  597. to save the value in another table  and increment it.  This is
  598. somewhat more complex, but prevents two users from creating the
  599. same record ID at the same time.  It is very simple to write a
  600. reusable method that would perform the action on any code table
  601. that conforms to a set structure.  The following works in Paradox
  602. for Windows:
  603.  
  604.      method NextKey (strTblName string,
  605.            strParameterFldName string,
  606.            strParameterValue string,
  607.            strKeyFldName string,
  608.            strKeyType string,
  609.            anyKeyIncrement anytype,
  610.            var anyKeyValue anytype) logical
  611.  
  612.     var
  613.        tc       tcursor;
  614.     endvar
  615.  
  616.     try
  617.        tc.Open (strTblName);
  618.        if not(tc.Locate (strParameterFldName,
  619.        strParameterValue))
  620.        then
  621.           ;//could not find parameter value
  622.           tc.Close ();
  623.           Return (FALSE);
  624.        endif
  625.        tc.Edit ();
  626.        while not(tc.LockRecord ())
  627.           ;//insure that we can get exclusive rights to the
  628.           ;//record temporarily
  629.           Message ("One moment, locking key record...");
  630.           Sleep (500);
  631.           Message ("");
  632.        endwhile
  633.        switch
  634.           case (strKeyType = "N"):
  635.          tc.FieldValue (strKeyFldName, anyKeyValue);
  636.          tc.SetFieldValue (strKeyFldName,
  637.             (Number (anyKeyValue) +
  638.             Number (anyKeyIncrement )));
  639.           case (strKeyType = "S"):
  640.          tc.FieldValue (strKeyFldName, anyKeyValue);
  641.          tc.SetFieldValue (strKeyFldName, 
  642.             (SmallInt (anyKeyValue) +
  643.             SmallInt (anyKeyIncrement )));
  644.           ...
  645.           ;// do same for other types that can be incremented
  646.           ...
  647.           otherwise:
  648.          ;//invalid data type
  649.          tc.CancelEdit ();
  650.          tc.Close ();
  651.          Return (FALSE);
  652.        endswitch
  653.        tc.PostRecord ();
  654.        tc.Close ();
  655.        Return (TRUE);
  656.     onfail
  657.        if (tc.IsAssigned ())
  658.        then
  659.           if (tc.IsEdit ())
  660.           then
  661.          tc.CancelEdit ();
  662.           endif
  663.           tc.Close ();
  664.        endif
  665.        Return (FALSE);
  666.     endtry
  667.  
  668.      endmethod
  669.  
  670. Just remember to do a type conversion when using anyNewKey after
  671. executing this method.  Obviously, you can add any other
  672. functionality you need.  
  673.  
  674. A similar procedure can be written for Paradox DOS.
  675.  
  676. 4.16 When should I use a filter (Order/Range) vs. Query? [WIN]
  677. The Order/Range command and the SwitchIndex and SetFilter methods
  678. let you select an index, then limit the values that can be
  679. presented.  This is extremely fast, but is limited to the current
  680. index order.  If you need to limit records based on values in
  681. fields not in the index, from criteria on more than one table or
  682. non-contiguous ranges, you should base your  form or report on a
  683. query, rather than limiting the range on the table.  Note that if
  684. you use DBase tables, you can use any DBase SELECT statement for
  685. your range expression.  This could make using DBase-format files
  686. worthwhile for some applications.
  687.  
  688. 4.17 Why can't I open the table? [DOS,WIN]
  689. Paradox for Windows and Paradox DOS apparently think that files
  690. in the wrong format are merely password protected.  This beats
  691. trying to mangle a file it can't use, but a "Wrong Version,
  692. Stupid" error message would probably be preferable.
  693.  
  694. Typical situations that cause erroneous Password messages
  695. include:
  696.  
  697.      a) A Paradox DOS table that has Set Protect Write-Protect on
  698. it, that you try to open in   Windows.  There is no equivalent
  699. function in Windows, you've got to clear the Write-Protect  in
  700. DOS.
  701.  
  702.      b) A Paradox Windows table with Strict Referential Integrity
  703. set on it that you try to open     in DOS.
  704.  
  705.      c) A Paradox 4.0 or 4.5-formatted table that you try to open
  706. in Paradox 3.5. 
  707. Note that all versions of Paradox let you set a "Compatible"
  708. format when reformatting a table.
  709.  
  710. 4.18 What are these *&!# files doing here? [DOS]
  711. Paradox/DOS is somewhat sloppy about leaving PDOXUSRS.LCK and
  712. $PALMEM$ files in directories that you use SETDIR to move to. 
  713. PDOXUSERS.LCK is used to lock records, $PALMEM$ is a swap file
  714. for memo fields.  They can get created, and not deleted, if you
  715. use SETDIR to change directories during a Paradox session.  Using
  716. SETPRIVDIR "C:\SOMEWHER" (a valid path) will ensure that these
  717. files get put *only* there.
  718.  
  719. 4.19 Where's the arrive trigger? [DOS]
  720. Unlike Paradox/Win, ARRIVETABLE, ARRIVEROW and ARRIVEFIELD
  721. triggers do not get sent to a Wait procedure if your procedure
  722. 'manually' moved to the new table, row or field.
  723.  
  724. The solution is to  call your Wait procedure recursively:
  725.  
  726.      PROC MyWait(TrigType,TheEvent,Cycle)
  727.     SWITCH
  728.     CASE TrigType = "DEPARTFIELD" AND FIELD()="Order Num"
  729.        DOWNIMAGE
  730.        MyWait("ARRIVETABLE",TheEvent,Cycle)
  731.        MyWait("ARRIVEROW",TheEvent,Cycle)
  732.        MyWait("ARRIVEFIELD",TheEvent,Cycle)
  733.     ENDSWITCH
  734.      ENDPROC
  735.  
  736. 4.20 How do I get the disk drive letters? [DOS]
  737. In Paradox/DOS 4.5, a new command is added for this:
  738.  
  739.      SYSINFO DRIVES TO DriveArray
  740.  
  741. DriveArray is a DYNARRAY containing one element for each drive,
  742. in reverse alphabetical order ;^)  Each element contains "SHARED"
  743. for network drives, else "LOCAL".  Note that they include the
  744. colon ("D:").  You may want to use
  745. DRIVESTATUS(SUBSTR(DriveArray[whichDrive],1) to test for an
  746. actually available drive, as the floppies are always listed, as
  747. is a not-ready CD-ROM drive, etc.
  748.  
  749. 4.21 Why can't I change data on a detail table? [WIN]
  750. By default, all 1-1 detail tables in your data model are set to
  751. read-only except for the master (left-most) table.  In the data
  752. model, right-click on each 1-1 linked table, and un-check the
  753. read-only property.
  754.  
  755. 4.22 Where did that table come from, and where did it go?
  756. [DOS,WIN]
  757. Paradox creates a number of temporary tables during processing. 
  758. They are normally deleted upon exit from Paradox.  If you have
  759. set a private directory, they will be in that directory,
  760. otherwise, in the current directory.  Don't delete these files,
  761. unless you have exited Paradox. See also question 4.18.
  762.  
  763.  
  764. Table                    Version        Comments
  765. ------                   ----------     -------------
  766. Answer                   Dos, Win       Query Result table
  767. Changed                  Dos, Win       Records changed in a
  768.                     CHANGETO query
  769. Chantemp                 Dos
  770. Crosstab                 Dos, Win       Created with the Crosstab
  771.                     command
  772. Deleted                  Dos, Win       Records deleted in a
  773.                     DELETE query
  774. DelTemp                  Dos
  775. Entry, Entry1, Entry2..  Dos            Created during DataEntry
  776.                     command
  777. ErrChng                  Win
  778. ErrDel                   Win
  779. ErrIns                   Win
  780. Export                   Win
  781. Family                   Dos            Tools/Info/Family Command
  782. Import                   Win            Family
  783. Inserted                 Dos, Win       Records added with an
  784.                     INSERT query
  785. Instemp                  Dos
  786. KeyViol, KeyViol1...     Dos, Win       Key Violations
  787.                     (Add, Insert Query,
  788.                     Restructure)
  789. Kvtemp                   Dos
  790. List                     Dos            Item lists from Tools
  791.                     commands
  792. Locks                    Win
  793. Pal$src                  Win            Created during EXECUTE
  794.                     commands
  795. Password                 Dos
  796. Passtemp                 Dos
  797. Problems,Problems1..     Dos, Win       Errors during
  798.                     restructures
  799. Probtemp                 Dos
  800. Resttemp                 Dos
  801. Sortques                 Dos
  802. Struct                   Win            Created during
  803.                     restructure or structure
  804.                     listing.
  805.  
  806. 4.23 What is the current versions of Paradox? [DOS,WIN]
  807. >> Paradox for Windows version 5.0
  808. >> Paradox for DOS version 4.5
  809.  
  810. -----------------------------------------------------------------
  811.  
  812. 5.0 Paradox 3rd-Party Product Directory
  813. Please let us know of your Paradox products (both DOS and WIN),
  814. and we will try to provide as complete a 3rd-party directory as
  815. possible.
  816.  
  817. David Sherman <dsherman@freenet.columbus.oh.us> has submitted a fairly 
  818. exhaustive list/Paradox db listing of 3rd party products and vendors. 
  819. We are reviewing it and will attempt to include it in the next FAQ release.
  820.  
  821. ## END PARADOX FAQ v2.2a ##
  822.  
  823.