OAUG Meeting November 95 Questions System Error after running a compiled application Keith O'Donnell raised a problem where OA reported a system error "Unimplemented p-code" when he tries to "Quit" Open Access 4. It only occurs after a compiled application has been run and he returns to the main options menu. OA is installed for a Netbios environment on a Lantastic network. It was suggested that he checks that the check version of NETBIOS.COM is being used to run the network. Database Table with corrupted decimal field A database table appears to have corruption in a decimal field. Fix-file and Resize do not appear to work. Neither does deleting the *.IF file and Resizing (after copying another dummy file to the *.IF file). It was suggested that doing a Query on the database table then Updating the field with the expression fieldname*1.0 could fix the problem. Another possibility is exporting the file to DIF or dBase then importing it back into OA. Note that the DIF export loses memo fields and the dBase export converts integer and time fields to decimals. A further suggestion was to use Design/Modify-file to set all fields to non-key, save the changes then use Design/Modify-file to set key fields again. Direct faxing from OA We would like to hear from anyone who successfully sends faxes directly from Open Access. This would probably involve software such as Bitfax for DOS which can be set up to emulate a printer and defining a printer with the appropriate 64 impossible questions under Open Access. The System Manager operating system comes with faxing facilities. Reading bank statements in ASCII format A user wishes to convert relevant lines in the ASCII file of a bank statement into database table records. The OA file converter does not work because some lines contain invalid data. This can be done under Programmer. See the INPUT , EXTRACT and POS commands for examples of reading ASCII files line by line. The general method, in a loop, is: Read the next line (READLINE!) Using EXTRACT, test whether it contains valid data If the line is valid generate a NEW database table record Using EXTRACT & VAL, assign values to the fields in the database table record INSERT the new database table record To test if a string contains a valid numeric value before using VAL you can test some or all letters with code such as s1 = EXTRACT(s2,1,1) IF s1>='0' AND s1<='9' va.amount = VAL(s1) END IF Limitation on comparing fields from different fields in an SQL join When you use an SQL to retrieve joined database records it is useful to be able to compare fields in the two databases. Unfortunately the Open Access database engine only allows = or <> (not equal to) to be used. Less than or greater than tests will not work. For example FROM file1,file2 WHERE chqnum=file2.chqnum and file1.amount < file2.amount will not work.. In this case you might need to create an extra working field and use Update to calculate the difference between file1.amount and file2.amount. Imbedded quote in print mask items The OA print mask uses the double quote " to identify virtual fields. "vf":sum(amount) creates a virtual field called vf with a value equal to the sum of the database table field amount. The virtual field can then be used in subsequent expressions. This facility causes problems when you need a single quote in a print mask item - for example TERRY'S PHONE LIST. If you try enclosing this in double quotes you will receive an error message. The trick is to use an expression which does not start with a double quote such as: '' + "TERRY'S PHONE LIST" ( etc) Running OA under Windows for Workgroups (from DOS or Windows) Open Access can be installed for a Netbios network under Windows for Workgroups. Also the peer-to-peer networking facilities which come with Windows for Workgroups can be run from DOS, without Windows. See the NET command in the Windows manual for details. Segmenting Compiled Programs Keith O'Donnell reported that he has found the method of segmenting compiled programs can make a big difference to response times over a network. Each time a segment is called the local CPU must read the appropriate "overlay" from the APP.SPI file which is on the fileserver. This can be 400K or more and it can cause delays. Our advice is avoid imbedding a segment call within a loop. For example if your code is of the form: WHILE RECNO(va) > 0 DO calc_av FIND va next END WHILE make sure that the code for calc_av is in the same segment as the calling routine. Multiple joins to the same database table within a print mask It is common practice to include the names and addresses of all clients of a business in one database table. This can include suppliers and customers. A problem arises if you wish to create a print mask which uses more than one record from the CLIENT database table. An example might be a JOB database table which has two "must match" fields linked to the CLIENT table. The first field might be the customer number and the second field might be the supplier number. In order for the print mask to be able to use the correct data the SQL needs to have an Alias assignment. The SQL might look like this: FROM JOB,CLIENT,T=CLIENT WHERE JOB.CUSTOMER=CLIENT.CUSTNUM AND JOB.SUPPLIER=T.CUSTNUM and the print mask can contain the alias fields: Suppler: [job.supplier] - [t.name] [t.phone] See the reference to Aliases in the Database Reference Manual for more information. News from SPI Lindy spoke to John Bowne from SPI in San Diego. He seemed enthusiastic about developments with SPI products. Windowbase 2.02 has just been released (bug fixes??) but there is no runtime version at this stage. OA 4 "plus" is under development following a push for extra features from Europe Distributors are being appointed in Spain, Italy and maybe France SQL Access (or similar product) is being enhanced to cover additional database structures - perhaps including Oracle. US Department of Defence has a "site licence" for over 400,000 users! We are waiting for more details about these initiatives from SPI.