Btrieve ® October-December 1994 Developer’s Journal Vol. II No. 4 THE INDEPENDENT SOURCE OF NEWS AND INFORMATION ABOUT BTRIEVE AND SCALABLE SQL

The conference opened Monday, BTI HOSTS T HE S UMMIT October 10, with addresses from Ron Harris and Nancy Woodward, BTI Btrieve Technologies Reveals Ambitious Plans for 1995 chairman. Nancy outlined the evolution of Austin, Texas — Over one hundred during the course of these meetings, and if Btrieve Technologies from its inception as representatives of organizations which use you don’t ask us questions, you can bet that Softcraft, Inc., through the ownership by Btrieve and Scalable SQL gathered in we’re going to ask you some.” , and the recent re-acquisition of the Austin in October to meet with Btrieve Summit participants included a product line by Btrieve Technologies, Inc. Technologies management and staff, and to diverse mix of accounting system vendors, She discussed BTI product introductions discuss the plans the company has for the corporate MIS departments, vertical during the first six months since the re- future. The two-day conference, organized market developers, independent acquisition, the current relationship with by BTI, was designed “...to let our consultants, and tool vendors, Novell, and the company’s strategy for customers know about our plans, and to get some from as far away as Europe and the positioning its products as cross-platform feedback from them about what their needs far east. Ron Harris mentioned the database solutions for middle-market are and what’s important to them,” said international aspect of the gathering in his database customers. One highlight of Ron Harris, president of BTI. During his opening remarks, and took the opportunity Nancy’s presentation was the opening remarks, he told participants not to to introduce Patrick Duboisset, recently announcement of “Built on Btrieve,” a be shy about asking questions, adding, “All hired to lead BTI’s European marketing market awareness program designed to of our employees will be in and out of here division. See Summit on page 4... IN THIS ISSUE The Summit Btrieve Technologies holds a two-day conference in Austin, Texas with leading users of Btrieve and Scalable SQL to discuss current strategy and future plans...... Page 1 Inside Btrieve Doug Reilly reports on the internal structure of Btrieve version 6.x and focuses on several differences between v5 and v6...... Page 8 Hands On Review Steve Mook takes a detailed look into the most common challenges users face when they attempt to access Btrieve-based data with Microsoft Access...... Page 13 BTI’s Technical Corner In another installment of Btrieve Technologies’ Technical Corner, we provide the latest technical information on Btrieve and Scalable SQL including how to optimize the new Btrieve version 6.15 engines.....Page 17

Btrieve Accounting Eric Cohen, CPA and Computer Accounting Consultant, begins a three-part series on why Btrieve is the best, safest, and most widely used method for maintaining accounting data...... Page 25 Photographer: Jamie Provenzano Btrieve and Scalable SQL users, BTI employees, and 3rd party vendors enjoyed the chance to meet face-to-face to And much, much more... discuss the future of BTI and their products. Seminars dealt with technical, marketing, and product support issues. Btrieve Developer’s Journal From1234567890123456789 the Publisher...

1234567890123456789 Volume II, Issue 4 1234567890123456789 As we at Smithware celebrate the first anniversary of 1234567890123456789 ISSN 1071-7463, published quarterly by 1234567890123456789 Btrieve Developer’s Journal, I want to sincerely thank all of you 1234567890123456789

Smithware, Inc. 1234567890123456789 who have supported our publication through your subscriptions,

1234567890123456789

1234567890123456789 input, collaboration, and comments. When we published our little

1234567890123456789 Staff 1234567890123456789 8-page premier issue in late October of last year, we had no idea 1234567890123456789

1234567890123456789 what a tremendous void BDJ would fill. We also could not have Publisher: Scott Smith 1234567890123456789 1234567890123456789 predicted that the movement of the Btrieve product line would Editor: Steve Mook 1234567890123456789 1234567890123456789 accelerate with such force. Contributors: Jon Burke, Eric Cohen, Jim 1234567890123456789 1234567890123456789 The end of a year always causes me to seriously consider

Fink, Ray Kukari, Doug Reilly 1234567890123456789 Contributors to Technical Corner: Linda 1234567890123456789 the future... This time, I find myself thinking about those things 1234567890123456789

Anderson, Doris Eldridge, Mad Poarch, 1234567890123456789 that, in my opinion, BTI must do in the coming months in order

1234567890123456789

Carol Rylander 1234567890123456789 to maintain and build on their leadership position in the middle

1234567890123456789

Graphic Design: Arthur Austin 1234567890123456789 market. The following is my proposal of these things. Design Consultant: Tania Owen Studio 1234567890123456789 1234567890123456789

Photograph by Dean Dixon They must continue to move the Btrieve Microkernel Photographers: Dean Dixon, Jamie Architecture to new platforms quickly. In addition to having a Provenzano SCOTT A. SMITH, PUBLISHER Btrieve engine as a database server on Microsoft NT, BTI will Illustrators: Will Owen, Albrecht Dürer move into other areas as well. These areas will include IBM Advertising Manager: Carolyn Lighty Circulation Manager: Cindi Gourley LAN Server, UNIX implementations, and PIN (Processor Independent NetWare) versions of Btrieve running on diverse platforms. Subscriptions They will heavily promote the proven scalability of the Btrieve product line. BTI will show the market that Btrieve truly is the only database manager that runs consistently and Annual subscriptions are for four issues per manageably from a one-user installation on a lap-top PC, to ten users on a LAN, to a thousand year at $49/year for delivery inside the users on a WAN. United States, and $79/year for delivery outside the United States. They should aggressively pursue the international market. Look for massive BTI organization, marketing, and fulfillment throughout Europe and look for a Btrieve subsidiary Back Issues: Back issues are available for operating in Japan by Mid-1995. $20.00 per issue. Contact Cindi Gourley at They will mobilize their marketing team to help develop and promote more robust and (615) 386-3100 for additional information. powerful third-party tools (yes, including Smithware’s line) by creating and strongly promoting a Built on Btrieve product identification and certification program. This program will help users of How to Contact BDJ Btrieve-based applications take advantage of the Btrieve tools that are already out there, and will expand the market for us as third-party tool vendors. Also, look for a strong BTI commitment to You may address news items, new product ODBC at the beginning of the year. announcements, tips, advice, comments, No one can truly predict the complaints, praise, or any other future, I suppose... So let’s look at this list correspondence to: again in a few months to see how I’m Btrieve Developer's Journal doing. 2416 Hillsboro Road, Suite 201 Nashville, Tennessee 37212 Telephone: (615) 386-3100 Facsimile: (615) 386-3135 Contents... CompuServe: 73173,2731 MCI Mail: 590-5654 Inside Btrieve Technical Corner Internet: [email protected] Inside Btrieve 6 Files 8 Technical Supplement to BDJ 17 Advertising By Douglas J. Reilly Btrieve Technologies, Inc. What has changed inside Btrieve since the Learn how to optimize Btrieve 6.x, hear For information about advertising your release of the version 6.x file structure? More details about what in store for the future of the product or service in Btrieve Developer's than you think! Btrieve Microkernel, and get the latest tips Journal, call Carolyn Lighty, Advertising available from BTI. Manager, at (800) 685-2403 or (201) 712- Btrieve Applied 0044. Getting a Handle on Btrieve 10 Accounting Copyright 1994 by Smithware, Inc. By James H. Fink Btrieve Based Accounting 25 All rights reserved. With the exception of the “Technical Corner” section, Developing applications in C just got easier: By Eric E. Cohen this publication is produced independently of Btrieve Use Jim’s stdio-like method for Btrieve access Here’s the first of a three-part series on Technologies, Inc. in C and you won’t regret it. Btrieve and Accounting systems. No part of this publication may be reproduced in any form by any means without permission in writing from the publisher. Hands-On Review Feature Article Smithware is a trademark of Smithware, Inc. Btrieve and XQL are registered trademarks and How to Make Microsoft® Access™ 13 Programming for Hire 31 Scalable SQL, Xtrieve Plus, and Microkernel By Steven A. Mook By Jon Burke Database Engine are trademarks of Btrieve Technologies, Inc.All other names are the trademark The connection between Microsoft Access and From the both the client’s and the contractor’s of their respective manufacturers. Btrieve can be difficult. Steve simplifies the point of view, Jon looks at the in’s and out’s process by answering common questions. of computer consulting services. The SUMMIT continued from page 1 including an announcement by Lori Baldwin, BTI channel marketing director, build end-user awareness of products which Duboisset to of proposed reseller programs, and training use the Btrieve and Scalable SQL data and certification programs for VAR’s and management systems. BTI’s cross-platform consultants. Mad Poarch, VP for customer Head BTI Europe strategy currently includes relations, presented a seminar on BTI’s Austin, Texas — support for DOS, Windows, OS/2, and proposals for fee-based technical support BTI has appointed server support for NetWare, and BTI options, and distributed a questionnaire Patrick Duboisset, a recently announced that it is developing a soliciting comments and customer former Novell Windows NT server in conjunction with feedback. This questionnaire was also executive in Europe, Microsoft. Other possible platforms posted on the CompuServe BTRIEVE to the post of currently under review are workstation forum so that customers who did not attend Director of European support for Macintosh and server support could add their input. Market for OS/2, UNIX, and PowerPC. The meeting ended with a Development. Doug Woodward, BTI chief question and answer panel discussion with “Patrick technical officer, followed Nancy with Ron Harris, Doug and Nancy Woodward will be responsible Patrick Duboisset insights into the direction of the product in which the panel addressed questions for positioning and line and the Microkernel architecture. submitted by attendees throughout the supporting BTI in Europe. He will work to Details of Doug’s presentation are included course of the conference. strengthen distribution channels with value- in “The Future of the Microkernel” article Reaction to the Summit was added partners in all sectors of BTI’s in this month’s Tech Corner on page 19. generally very positive. Most of the relationships abroad,” said Laurie The conference included several conference attendees considered BTI’s Wisbrun, a BTI representative. seminars on the technical and business willingness to share strategy and solicit Patrick was with Novell in aspects of the new company. The Scalable feedback to be a helpful and refreshing Southern Europe from 1989 through 1993 SQL product overview and feedback change from the way in which many of where he was responsible for increasing session led by Bo Holland, BTI product their suppliers do business, and most Novell’s market share from 40 to 65% marketing director, touched on licensing appreciated the opportunity to meet with throughout the region. issues and technical questions from their colleagues and with BTI staff. According to Mr. Duboisset, “My developers. Questions and comments from BTI officials said that based on ambition is to build strong distribution the audience followed, with a consensus the positive feedback from the first partnerships, and identify and appoint that ODBC support was important if not meeting, more Summit meetings will be authorized solutions integrators, and to from a development standpoint, at least planned for the future. make BTI the industry de facto standard in certainly from a marketing standpoint. The ² the departmental database engine market.” discussion ultimately centered on the challenges developers and users face when trying to migrate data from non-relational legacy applications to relational systems, News Briefs such as issues of data definition and security, mission critical application BDJ Executes Distribution Agreement in Japan performance, and data conversion. Carol Nagoya, Japan — An agreement to distribute Btrieve Developer’s Journal to the Japanese Rylander, Btrieve product manager, led a market has been executed between Smithware, Inc., publishers of BDJ, and AG-Tech session on Btrieve which dealt primarily Corp., the leading supplier of Btrieve support and services in Japan. According to Steve with the new licensing structure and the Mook, Smithware’s Vice President for Development, “We are pleased with AG-Tech planned improvements to the Microkernel. Corp’s decision to become involved with our magazine because we recognize the vast The scheduled after-dinner global support that Btrieve enjoys, particularly in Japan. AG-Tech will provide additional keynote address on Monday evening, “The material pertinent to the Japanese perspective in the copies of BDJ that they distribute.” For additional information, contact Smithware at (615) 386-3100 or AG-Tech Corp. in Japan at Info Bond: A View from a Pothole,” (052) 951-2706. unfortunately had to be canceled when Rick Segal, multimedia evangelism manager for Microsoft Corporation, was unable to Synex Systems Readies @Trieve for Excel attend due to illness. Conference attendees Vancouver BC, Canada — The leading manufacturer of spreadsheet links for Btrieve files, instead spent the evening visiting Austin’s Synex Systems, is preparing to release a new version of @Trieve for Excel. @Trieve hot links data from any indexed Btrieve file directly into an Excel sheet through the use of historic Sixth Street, talking with commands, functions, and macros on a read-only basis. If a user sets up Excel sheet colleagues and BTI employees, and templates with @Trieve, it is then possible to pull live data into Excel at any time with the watching several hundred thousand bats click of a button. @Trieve is compatible with:local and requester versions of Btrieve 5.x, stream from their nesting site under the 6.10, and 6.15, and with Excel versions 4 and 5. Additional functionality may include a file Congress Street bridge. query command to assist users in pulling data via dialog screens with the option of saving Tuesday meetings dealt primarily these queries as macros, and enhanced screens for specifying index requests. Contact Synex with business and marketing issues, Systems for additional information at (800) 663-8663 or (604) 688-8271, Fax: (604) 688- 1286, BBS: (604) 688-2351, or GO SYNEX on CompuServe.

3 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- Briefly Noted MICROSOFT-BTI ANOUNCE P ACT Agreement to Deliver Client-Server Btrieve Business Tools, Inc. (919-932-3068) has announced the release of TAS Database Engine for Windows NT Professional version 5.0, the latest Atlanta, Georgia — Microsoft and Btrieve running business-critical Btrieve release of their popular modular Technologies, Inc. (BTI) announced an applications today.” design environment for accounting agreement to deliver and jointly market With this announcement, and business information systems... the Btrieve database engine for the Microsoft and BTI officials confirmed that Solomon Software (419-424-0422) Windows NT Server . Btrieve applications can now announced that both of its accounting Under the terms of the agreement, the two automatically scale from mobile laptops or product lines, Solomon IV for companies have agreed on a broad set of notebooks to large client-server Windows and Solomon III for joint marketing programs that are intended configurations with symmetric Btrieve, will be available on to introduce Btrieve and Windows NT multiprocessing hardware without NT Server 3.5, customers to the benefits of the combined changing a line of application code. as well as on Novell’s NetWare. technology. Production shipments of Btrieve The company announced that The joint agreement was for Windows NT are scheduled to begin Solomon IV Server Edition, which announced as part of a keynote address by the first quarter of 1995. ² runs on Scalable SQL, also will be delivered at NetWortd+Interop by Jim available on Windows NT Server. Allchin, vice president, Business Systems Solomon also has introduced a Division of Microsoft, and Ron Harris, Crystal Reports 4.0 multimedia demonstration CD-ROM President and CEO of Btrieve of their Windows-based accounting Technologies. Released software... Btrieve Technologies As part of this agreement, Vancouver BC, Canada — Crystal has Inc. (512-794-1719) is looking for Microsoft will include a coupon in every announced major new versions of beta sites for the Windows NT package of Windows NT Server that can Crystal Reports and the Crystal Reports Btrieve engine. Send company name, be redeemed for a ten-user version of the Server. address, contact name, CompuServe client-server Btrieve database engine for “We have increased the speed account ID, and the timeframe in Windows NT for a promotional price of dramatically,” said Greg Kerfoot, which you are available to actively $99. After one year, BTI plans to offer an President of Crystal Services and test the beta software to the BTI CIS attractively priced, shrink-wrapped Director of R&D. “We have also account, 74431,3337. The Btrieve package of Windows NT Server and provided the end user with the ability to for OS/2 v6.15.1 pre-release is now Btrieve through its distributors. get the information they require with available in the CompuServe “This agreement makes it easy the Crystal Reports Server 4.0.” BTRIEVE forum to anyone who for Btrieve customers to get the Crystal claims that thier totally wants to try it out. You may scalability, portability and reliability of re-designed report engine with “Smart provide feedback in forum section Windows NT Server,” said Allchin. Engine Tecnology” greatly increases 13. This pre-release may contain “Customers using the many applications performance over previous versions, some areas of functionality which built on Btrieve for industries including with reports being generated 2-10 times have not been perfected... Magic insurance, banking, health care, faster than before. Advisor International (301-779- manufacturing and accounting can now Crystal Reports version 4.0 4709) has been formed to publish a adopt Windows NT easily.” also includes “Experts,” which prompt new magazine entitled MagicCom, In April of this year, BTI users for choices, and then do reporting the “Magic Communications acquired Novell’s database product line tasks for them automatically. Magazine.” The bimonthly and began aggressively investing in new Improvements to the publication features articles of marketing, sales and development include a new tab interface, ruler, interest to developers who use the programs, including the expansion of the “Best Fit” button, automatic styles, and Magic development tool from Magic product line to new platforms. This is the a new grid with on/off and visible/ Software Enterprises. Subscriptions first announcement of BTI products invisible options. are $49/year in the US and Canada available for Windows NT. The version 4 release also and $99/year elsewhere... IQ “The combination of Btrieve, adds 20 new direct-call functions to the Software Corporation (404-446- Windows NT Server, and the Visual Basic developer interface of its report engine, 8880) is shipping their new IQ for programming system provides a powerful and has added a new OCX object in Windows version 4.0. IQ is a client- platform to meet the growing needs of addition to its Visual Basic VBX server query and reporting tool that small, medium, or departmental interface. supports many including organizations,” said Ron Harris. “The Contact Crystal Services at Btrieve and Scalable SQL... agreement is a big win for the more than (800) 877-2340 or (604) 681-2934. one quarter-million sites in North America

4 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- copy that is not current. If the change is made successfully, the counters are changed and Btrieve will know which file control page is correct. If the change is not completely written, no harm is done, since the file control page will still be the copy that was correct before the change was begun.

Halt! What file type goes there!

An interesting side trip is in order. On several occasions, I have had Btrieve developers who wished to determine if any arbitrary file was a Btrieve file. After I attempted to get them to simply try and open the files using Btrieve, I was able to give some answers for version 5.x files, but they were at best hints and rules of thumb. What follows is a Inside Btrieve 6 files fairly surefire way to determine the if a file is a Btrieve file. By Douglas J. Reilly, Access Microsystems, Inc. First, check the length of the file. If it is not divisible by 512, forget it. This is not a Btrieve file (or it could be a very badly or strangely damaged Btrieve file). Next, open the file in binary When I first mentioned to the folks at Btrieve mode and read the first 10 bytes. The first 4 bytes will be 46 43 Developer’s Journal that I wanted to take a look at some of the 00 00 hex. Next, look at the tenth byte. This should be an even differences between Btrieve version 5.x files and version 6.x number between 2 and 16 inclusive. If not, this is not a Btrieve files, I had no idea how great the differences between the two 6.x file. This is the number of 256 byte blocks in the page size. file types would be. Was I in for a shock! Calculate the PAGE_SIZE (if 2, PAGE_SIZE=512, if 4, For details of the version 5.x format, I refer you to PAGE_SIZE=1024) Next, read the 4 bytes exactly “Special Assignment... Btrieve File Recovery” in the Jan- PAGE_SIZE bytes from the beginning of the file. These four March 1994 BDJ (Vol. II, No. 1). One of the major changes in bytes must also be 46 43 00 00 hex. If they are, you can be how Btrieve works for Version 6.x is the elimination of pre- reasonably assured that it is a Btrieve 6.x file. imaging files which were used in prior versions of Btrieve to maintain file integrity. In Btrieve version 5.x, before changes Page Allocation Table (PAT) Pages were made to the Btrieve file, the original pages were written to a file with the same name as the Btrieve file, but with an After the file control pages, there is a new type of page extension of “.PRE”. It is for this reason that you were never to in Btrieve 6.x: Page Allocation Tables, or PAT’s. The only create Btrieve files that had a file name that differed only in the reason this may sound familiar to some of you is that BUTIL extension (for instance ORDER.HDR and ORDER.DET). may have reported to you that the PAT’s are damaged. What Btrieve 6.x files do not create pre-imaging files, however the exactly do these PAT pages do? Look at figure 2 to see the first naming restriction remains the same, since Btrieve does in some portion of a PAT page. Like File Control Pages, PAT pages cases (continuous operation) create special files with extensions come in sets of two. Just like the File Control pages, the PAT of “.^^^”. pages have a usage count used to determine which of the pages How does Btrieve version 6 ensure that information is is the current “good” PAT page. Perhaps even more interesting properly written or restored? This brings us to the first major is the fact that there exists a second way that Btrieve can use to change in the internal structure of Btrieve files for version 6. determine which PAT page is the current PAT. There is a 32 bit Look at figure 1. This shows beginning of the first page of a bitmap (I believe in the FC page) that Btrieve can use as a Btrieve file in a hex “reality check” to ensure that the correct PAT is in use. Those I had no idea how editor. Note that the first database folks out there may have already noticed a potential two characters on the great the differences page are 4643 hex (the characters “FC”, I between Btrieve version 5 assume for File Control). All pages in and 6 would be. Was a Btrieve file now have some identifier in the I in for a shock! first two bytes. The most fascinating thing about the file control page is that there is another instance of that page directly following it. This is where it gets interesting. On each of the file control pages, there is a counter that is checked by Btrieve to allow it to determine which copy of the file control page is current. When changes are made, they are made to the Figure 1 - The Beginning of the First Page of a version 6.x Btrieve File

5 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- When I was first poking around with Btrieve 6.x files, the first thing I wished to determine was the layout of records within the data pages. This is important to me as the developer of recovery utilities that sometimes go the extra mile beyond simply using Btrieve calls to do the file recovery. In some cases, I would simply go from page to page, searching for possible data pages by trying to set the record position (using the SET_POSITION operation code 22) to the first slot on a page and testing for status 43 (invalid positioning). If I got a 43, I assumed the page was not a data page and moved on, otherwise, I tried every possible record start position on the page, based upon what I knew about the record length and the number of keys that allowed duplicates. The number of keys Figure 2 - Page Allocation Table Page that allowed duplicates was important because pointers to the previous and next record for each duplicate key had to be stored. For details, I once again refer you to “Special problem with this scheme: Forgetting for a moment what you Assignment... Btrieve File Recovery” in the Jan-March 1994 have to do when your 32 bit bitmap is filled up (it sure sounds BDJ (Vol II, No. 1). ugly to me), what is the rule for data stored twice? That’s When I started looking at the pointers, it was correct! If data is stored twice, there is a good chance that it apparent to me that something was different. The pointers did will be stored incorrectly in one of those places. The folks at not seem to be quite right. For example, look at figure 4. At BTI recognized this as well, and removal of this bitmap is one offset 3356 there is a pointer to a next or previous record (I of the minor changes between am not certain which as I write the 6.10 Btrieve NLM/Requester this, but I assume it is a next and the 6.15 file format. pointer). Because of the way The first two bytes on numbers are stored in Btrieve the PAT pages are 5050 hex (or files (not Intel format) the hex the characters “PP”, perhaps for numbers 00002005 represent hex PAT Page). After some header 520 or decimal 1312. This is information, the PAT page from a 512 byte page size consists of many 4-byte pointers Btrieve file, and so we know that to pages within the file. this cannot be a direct pointer, Actually, the pointers are 3 since the four pages allocated to bytes, since one of the bytes is FC and PP pages mean that as a used to indicate what type of direct pointer using the page is pointed to by the beginning of the file as a basis, it pointer. Looking carefully at Figure 3 - Data Page would point into the first of the figure 2, notice that at offset PP pages. Then I tested the offset 1549 there is a character ‘D’ (hex 44). This tells us that the from the end of the FC and PP pages, 512 times 4 (for the 4 page referred to by this particular pointer is a data page. FC and PP pages) plus 1312, gave me 3360. 3360, as you can (Other known values that can be embedded into the pointer see in figure 4, is the byte hex 01 just before the next record are ‘A’ for Alternate Collating Sequence, ‘V’ for Variable tail begins, and so the mystery was solved. The previous and next data, and any value over hex 80 for indexes, with the a page pointers were pointers from just beyond the FC and the PP for index 0 being denoted by a value of hex 80, a page for pages. At first I thought this might just be a way to get index 1 being denoted by a value of hex 81, etc.) At offset slightly beyond the 4 gig limit on file size, but then the 1550, notice the hex value 06. From this we know that the page that this pointer refers to is at offset 6 times the page size (in this case, 6 x 512, or 3072). Sure enough, as we look at figure 3, we find at offset 3072 what looks like a data page. The number of pointers varies with the page size. Take the page size, divide it by 4, subtract 2 for some header information on the PAT pages themselves, and you have the number of page pointers you can find on a given PAT page. For instance, if the page size is 4096, divide that by 4 and you get 1024. Subtract 2 and you have 1022. So, from this, we know that in a file with a page size of 4096, each PAT page contains pointers to 1022 pages, or 4,186,112 bytes of data. This is, of course, far short of the current stated limit for Btrieve files of 4 gig. How does Btrieve keep track of additional pages? Therein lies a tale... Figure 4 - Another Data Page

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No.limitation 4 October-December to the PP page 1994 setup sank Btrieve in. Since Developer's a single PP Journal page mechanism to allow multiple PP pages. If pointers are based ‘Q’ (a value I am not sure would ever be valid). Much to my upon distance from the PP page that a particular page reports to, surprise, BUTIL -SALVAGE never reported an error. My this could have the effect of eventually (when ported to an programs could still read and write the file, and even more of a operating system that supports it) removing Btrieve’s 4 gig file surprise, after the write to the file, the PAT page was “healed”. size limit. Very neat indeed! All the bogus values I placed in the PAT page were now Getting back to my immediate problem, that of trying replaced with the proper values. Very strange! to recover data from badly damaged files, one thing that had In fact, while I know that PAT errors occur, and I am served me well in the past was to simply eyeball the file and fairly sure I know what should cause them, I am thus far (using from that determine where data would be. It soon became clear Btrieve 6.15 for DOS) unable to cause one to occur. Like the that this was not going to work with Btrieve version 6.x files. previous problem (and it IS a problem if you cannot cause a For example, if I add a single record to a Btrieve 6.x file, it will failure to occur as you would expect), I anticipate I will be able appear neatly once in the file. However, if I then add a second to resolve this over the next several weeks. record to the file (assuming that the record does not take up an entire page), you will find that there are two instances of the To be Continued... first record in the file: The original instance, on a page by itself, and another copy on the page where the second record has been The scope of the internal changes to Btrieve version 6.x added. It appears that Btrieve writes the new page (with both files has been a surprise to me. BTI has done many wonderful records) and if all is well, commits the new page, but does not things with the Btrieve file format, and yet has managed to obliterate the old page. This is important, because if you are allow old programs to continue to function. This is the beauty of writing a grungy routine to salvage records from a damaged detail hiding. Next time, we will continue to expose some of the file, you may well get much more than you bargained for. The details of Btrieve file internals. I don’t expect you will need to issue is even more confusing when rather than entering a new, use (or should use) the gory details to do the bulk of your work, second record, you are simply editing the first record. Then but these details can be critical when that call comes telling you determining which page is the “good” page is even more that a catastrophic failure has occurred on a critical Btrieve file, complex. This has required a bit more study than I had and that week-old backup just won’t do. originally anticipated, but rest assured that a coherent strategy ² for getting at the real data will appear in my next Inside Btrieve column. Doug Reilly is the owner of Access Microsystems Inc., a software In order to see what type of error will give a PAT development house specializing in C/C++ software development, often error, I got out my trusty hex editor and purposely messed up using Btrieve as a file manager. He has had articles on Btrieve published in the file in several ways: I changed the values of pointers on the Dr. Dobb's Journal and is also the author of BTFILER and BTVIEWER PAT page (making sure I was using the copy of the page that Btrieve file utilities available on CompuServe. Doug’s CompuServe address is 74040,607 and can be contacted at 404 Midstreams Road, Brick, NJ was currently “good”). I changed the ‘D’ embedded in the 08724 or at (908) 892-2683. pointer to indicate that the pointer pointed to a data page to a

provides all access to the Btrieve record manager, has 6 parameters, and arguments for all 6 must be provided regardless of the Btrieve record operation being invoked. But, depending on which of the 35 operations the programmer is invoking, the content and use of the arguments changes. Some of the arguments involve complex type casting, and others are buffer lengths that may vary over time. If an error is made when providing an argument, Btrieve error messages are often cryptic, and sometimes misleading, causing frustrating debugging sessions. Use of the BTRV() function for even the simplest processing of a table provides ample opportunity for error. To sequentially process a table on an index, the programmer has to open the table, get the first record, repeatedly get next records, and close the Btrieve table. A Getting a Handle on minimum of 24 arguments must be correctly supplied to successfully complete this task. This article will explain a method of dealing with these Btrieve problems so that the application programmer can concentrate on by James H. Fink, The PROMPT Corporation using Btrieve to solve his or her application problem. The method uses a model that will be familiar to all C Using the Btrieve application interface for the C programmers --the stdio model. When processing a file using programming language can be an error prone and frustrating stdio, the programmer communicates with the using experience, even for experienced programmers who are familiar an integer handle or a pointer to the file provided by stdio that with the Btrieve API. The integer function BTRV() which minimizes the chance for error by limiting the frequency with 7 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- which the programmer must specify information. typedef struct BT_FILE { int handle; //the handle for the table An Example char SQL_name[20]; //optional table used in SQL queries char full_path_name[64];//full path name of table Figure 1 demonstrates how this method achieves the int open_mode; //readonly, readwrite, etc. int index; //the index goals of reduced program complexity when accessing Btrieve int status; //last status code returned for table tables. It depicts a fragment of a program designed to char* data_buffer; //pointer to the buffer for the table sequentially access a table. The program will process an int data_length; //the length of the data buffer char posblock[128]; //Position Block insurance policy table from the first record to the last on index int opcode; //the last opcode used for the table 0, in read-only mode. char* key_buffer; //pointer to the key buffer int key_length; //the length of the key buffer; long record_count; //total recs in table at open time } bt_file, *pbt_file; #include "bt.h" //the btrieve handle access routines

//structure for policy table record struct POLICY_REC { Figure 2 - The BT_FILE structure char PolicyNum[7]; char PolicyData[93]; A word is in order about the field SQL_name. This }rec; method was implemented in a Novell 3.12 production //structure for policy table key 0 environment supporting multiple Btrieve tables of 1 GB or struct POLICY_KEY0 { more, using NetWare SQL. These tables frequently change char PolicyNum[7]; location due to space constraints. To accommodate this, we }key; established the convention of the “Table Directory” table which int main(int argc, char** argv) { is always located on the SYS: volume in a particular directory. This table contains the SQL name of the file (such as “Policy” Handle policy; //Handle is a typedefld int in “SELECT * FROM Policy”) and its current full path name. //inititalize table with the SQL name "Policy" This approach allows for a significant measure of device //rec is the data buffer, key is the key buffer independence, as will be demonstrated below. policy=bt_init("Policy", BT_readonly, 0, rec, key);

//get the first record bt_getfirst(policy); Initializing the Structure

do { To support this method, I developed the concept of //process each record } “initializing” a Btrieve table. Normally, when processing a while (bt_getnext(policy) != BT_eof); table, one need only open it. Initializing a table initializes the BT_FILE structure, opens the table, and does a “stat” operation bt_close(policy); } on the table. Figure 3 shows the function prototype for bt_intialize().

Figure 1 - Btrieve programming using the stdio model. int bt_initalize(char* SQL_name, int open_mode, int index, char* databuffer, int datalength, char* keybuf, int keylength);

The Approach Figure 3 - Prototype for bt_intialize

Figure 2 shows the typedef declaration of a C structure, This function searches the “Table Directory” table for and a pointer to that structure, which I used to implement this the SQL_name, captures the current full-path name of the file, method. The approach is to allocate and fill one of these dynamically allocates and constructs the BT_FILE structure, structures for each unique Btrieve table access path (i.e. table opens the table, does a “stat” operation on the table, and fills in and index) required by a program. The function doing the the number of records on the table. If successful, the function allocation will assign the structure a unique integer handle, and returns a positive integer handle which will be used for all return that handle to the caller. Thereafter, the caller invokes subsequent access to the table. Btrieve record operations by specifying the operation and the In practice, calling this function proved tedious as handle. structure addresses had to be cast to character pointers. To Included in the method is a means of “soft” coding the provide relief, I devised the macro “bt_init” shown in figure 4. location of Btrieve tables so that they can be moved and located at run-time without recompilation. The structure and its //bt_init macro use to simplify calls to bt_intialize() function #define bt_init(SQL_name, mode, index, buffer, keybuffer) \ associated functions are partitioned in such a way that the bt_intialize(SQL_name, mode, index, (char*)&buffer,sizeof(buffer)\ programmer never directly deals with the structure. The only (char*)&keybuffer, sizeof(keybuffer)) way the programmer changes the structure is with the associated functions. Figure 4 - bt_init Macro

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal This reduced the number of arguments required to initialize a Error Handling and Status Reporting Btrieve table from 7 to 5, as the macro computed the lengths of the data and key buffers and performed the appropriate type To provide easy error handling, I established a global casting. Boolean variable, bt_robust. This variable may be set or reset at Practice also revealed that there were times when we any time. When this variable is TRUE, Btrieve error conditions wanted to open a table not identified in the “Table Directory” encountered by the bt_access() function are returned to the table, so I developed a “hard” initialization function to allow the caller. The caller can then deal with them as needed. When this programmer to provide the full-path name of the Btrieve table to variable is FALSE, the program will halt and issue an be processed. appropriate error message. This is useful in the early development stages so that energy is directed at building the Accessing the Table application, not error handling. Certain ambiguous errors, for instance a duplicate key while inserting, are always returned to Once a handle has been obtained, all subsequent access the caller for processing so that the programmer can determine to the table is greatly simplified. The function bt_access(), within the context of the application if an error has actually prototyped in figure 5, manages all record operations for the occurred. table. The bt_access function takes as parameters the handle and To aid in status reporting, I established a global integer the record operation code. It then looks up the BT_FILE variable, bt_status. The last status code returned by Btrieve is structure allocated for that handle to collect all the data always placed in this variable, so that status checking can be necessary to complete the requested record operation, and delayed. executes it. Some operations require that additional information be In Conclusion placed in the key buffer or data buffer. For example, a Get Equal operation requires a search argument in the key buffer. The simplicity, readability, and focus of this method as In these cases the programmer simply places the data in the compared to the use of the standard BTRV() function speaks for appropriate buffer before invoking the bt_access() function. itself. The method is also easily adaptable for a C++ The integer returned by the bt_access() function is the implementation. Btrieve return code. ²

int bt_access(int handle, int opcode);

Figure 5 - bt_access Prototype Acquiring the Software Once again, it proved tedious to remember and supply all 35 opcodes, so I defined manifest constants and mnemonic Building and testing the software to macros for each of the principle record operations, as shown in implement this approach should take you less figure 6. than a week. The author recommends doing so if you want to learn the in’s and out’s of #define BT_geteq 5 #define BT_getfirst 12 Btrieve. #define bt_geteq(handle) bt_access(handle, BT-geteq) #define bt_getfirst(handle) If you would like to acquire the source code, bt_access(handle, BT_getfirst) //etc. etc. object code, library, and documentatation for his implementation of this method, including Figure 6 - Mnemonic Defines a full function dynamic memory manager and linked list processor suitable for Closing Up compilation by Microsoft C version 6.Oa through Microsoft C 8.0, kindly remit The function bt_close(handle) closes a table, and $50.00 to: returns the memory allocated for its BT_FILE structure to the The PROMPT Corporation heap. A happy by-product of this approach was the function 90 Mill Street bt_closeall(void), which allowed the programmer to be certain that all tables were correctly closed and memory returned to the Lincoln, MA 01773 heap, without any special coding techniques to track which tables might be open or closed. This was particularly useful for Please specify 3.5" or 5.25" format. handling ABEND’s occurring in the middle of opening multiple tables. The ABEND is handled by issuing a bt-closeall(), and exiting.

9 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- server as a NetWare Loadable Module (NLM), receives the results from the server process, and passes them back to the application. Btrieve for Windows also has both a local and a client- server implementation. The local implementation is required to process any files not accessible to a server process (such as files on a local hard drive as opposed to files located on a network server running NetWare Btrieve). Local Btrieve for Windows version 5.10 is implemented as a dynamic link library called WBTRCALL.DLL, or WBTRLOCL.DLL if configured to run in conjunction with the NetWare client-server version of WBTRCALL. The size of this file is about 51K bytes. It links directly to the application and performs all Btrieve file I/O. The new Btrieve Client Engine for Windows, version How to Make 6.15, is implemented as a Windows executable program called ® ™ WBTR32.EXE. There is still a WBTRCALL.DLL, but it is much smaller than the Btrieve version 5.10 DLL, as it does not Microsoft Access handle any file I/O itself. WBTRCALL.DLL determines A short, practical guide up the slippery slope. whether a Btrieve request should be routed to the local or to the server engine based on settings in the configuration file BTI.INI. WBTRLOCL.DLL acts as an interface between the by Steven A. Mook, Smithware, Inc. Email: [email protected] requester interface, WBTRCALL.DLL, and the Btrieve for CompuServe: 71660,2746 Windows Client Engine, WBTR32. Until Btrieve Technologies releases a true DLL Experience has shown that Microsoft Access is a very requester for Windows, BREQUEST.EXE remains a critical powerful database query tool. Experience has shown that link in the Windows implementation of NetWare client/server Btrieve is a very fast, very reliable database engine. And Btrieve. WBTRCALL.DLL routes requests for server-based experience has shown that hooking the two together is rather data from the application to BREQUEST via a DOS Protected like bringing elephants over the Alps. Once you get to the top, Mode Interface (DPMI). The client/server WBTRCALL.DLL all you need is a really big sled. The trick is in getting to the will attempt to pass requests for local data on to the top. The questions used in this article were adapted from WBTRLOCL.DLL for processing, either internally (in version messages posted on the CompuServe MSACCESS support 5.10W), or via WBTR32 (in version 6.15). forum from July through October 1994, and they represent some The key to this error is simply that you must have of the more common pitfalls. Btrieve on your system where it can be loaded by Access. Though you may have DOS applications which can access Access returns “Unexpected error from external database Btrieve files, you may not have what you need for a Windows driver [20]” whenever I try to attach to Btrieve. application to access those files, as the DOS and Windows Btrieve client engines are different. If you have a Novell As with the other “Unexpected error from external network, then you do have the Windows run-time engine for database driver” errors, the number in brackets is the actual Btrieve as well, but Btrieve must be loaded and configured status number returned by Btrieve. Which means that you have properly as an NLM on your server, and BREQUEST must be at least one piece of Btrieve for Windows out there to return a loaded prior to Windows. For access to non-NetWare drives, status. But do you have the right piece, or enough of the pieces? you must have one of the client engines, either the 51K version Microsoft Access requires a Btrieve for Windows 5.10 WBTRCALL.DLL, or the version 6.15 WBTR32.EXE. engine in order to open Btrieve files. Status 20 indicates that Btrieve for Windows is not loaded. As often as not, this error I have a Visual Basic application using Btrieve, but I don’t message means you simply don’t have a Btrieve engine for have access to any data dictionary (DDF) files. I guess the Windows. Microsoft pulled it from the Access box shortly after DDF information is embedded in the Visual Basic code, the release of version 1.0, following a license disagreement with which I don’t have access to. Is there any way to pull the Novell, which held the copyright at that time. data into Access? Application programs which run in DOS don’t use the Btrieve for Windows drivers to access their files. They make Good guess. And the answer is no. There is no record requests to a terminate-and-stay-resident (TSR) practical way to pull data from Btrieve tables into Access executable program in DOS, BTRIEVE.EXE, but this program without DDF files which define the Btrieve data. Probably the is not accessible to Windows applications. There is also a client- vast majority of Btrieve-based programs were written without server version of Btrieve which runs on Novell NetWare, which DDF files. Up until a couple of years ago, most people allows server-based access to files on NetWare drives. developing Btrieve-based applications didn’t even know what a on the network accessing these data files run a DDF was. Btrieve stores and retrieves records as blocks of data TSR called BREQUEST.EXE. This “requester” transmits based upon predefined indexes within the data, and does not requests for information to Btrieve running on the NetWare concern itself with what’s in the non-indexed portion of the records. Naturally, the application which files the data can be

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal counted upon to understand how to interpret it. did it is essentially a snipe hunt. But in order to pull meaningful information from a data The GPF message box will tell you in what module, file, a generic database front end or report writer such as Access and at what address, the error occurred. This is not necessarily has to have a list telling it where the discreet pieces of meaningful information, as one module can set up the conditions information, or fields, are in the record. That’s essentially what which will percipitate a GPF in another module. But it's a a DDF is; a list, or actually, three related lists, FILE.DDF, place to start looking. A GPF in BTRV200.DLL or in FIELD.DDF, and INDEX.DDF, which tell Access what the MSAJT200.DLL usually indicate that the fault had something to files are in your data base, where and in what storage format the do with Access, or with the DDF definition of the file, which is fields are within the records in those files, and what fields are what Access uses to know what to expect from Btrieve. An indexed. error in WBTRCALL, or one of the other Btrieve components, The best place to get DDF files is from the application usually indicates a problem with your Btrieve configuration. developer. The second best method is to get field layouts of the The weak link in this chain, if you’re using NetWare data files from the developer, and use them to create the DDF Btrieve, is the DPMI layer between WBTRCALL.DLL and files yourself. The last resort method is to hack the data files by BREQUEST.EXE. It’s critical that these two be matched opening a file, looking at the raw data, and finding known correctly, or a GPF is a relative certainty. If you’re not sure, values for fields within an individual record. Either of the first you can download compatible versions of both in the file two methods is vastly preferable to the third. BTRREQ.EXE in the NOVLIB forum on CompuServe. Should There are some Btrieve data files which simply cannot the GPF persist, strip anything out of DOS that doesn’t look as be defined using DDF’s. If, for instance, the programmer stored if it absolutely has to be there, and try again. If this cures the some critical piece of information in a storage format which is problem, you can begin carefully adding back device drivers and not one of the standard DDF field types, that information will TSR’s until the whole thing blows up again. If you’re really, not be available to Access. The DDF standards were developed really lucky and the solar flares have died down, it might just to define SQL data, and Btrieve data stored by non-SQL keep working. applications may not conform to the standard DDF definition But seriously, when this fails, the next most likely rules. problem is that you’ve got an old piece of something loading in Windows where a new piece is supposed to fit, and the most When I try to attach Access version 2.0 to one of my Btrieve likely culprit is Btrieve. Windows programs load modules called version 6.x data files, I get “Unexpected error from external dynamic link libraries, or DLL’s, which provide specific database driver [7]” functions the programs need. Btrieve for Windows uses DLL’s You’re in luck, it’s just a bug. Your problem stems to hook into other programs. Windows hunts for dynamic link from a bug in the first release of the Microsoft Btrieve driver, libraries first in the directory with the executable that wants BTRV200.DLL. It’s been fixed. There’s a new one available them, then in the \windows\system directory, then it starts down on CompuServe in the MSACCESS forum library. The file the primrose PATH. And it loads the first match it finds. So name is BTR200.EXE, a self-extracting zip file containing now you must do likewise, and go rooting around through your everything you need to make the problem go away. Don’t you \access directory, your \windows and \windows\system wish they were all that simple? directories, and all the directories in your path (don’t forget network directories, especially the NetWare \public directory), When I try to look at the records in one of my Btrieve tables, looking for outmoded Btrieve DLL’s. Delete them, rename Access tells me it encountered an “Unexpected error from them, but one way or the other, get them out of harm’s way. external database driver [22]” I installed the Btrieve for Windows drivers, found a set of Your Btrieve file and your DDF definition for that file DDF files, and tried to open FILE.DDF. Now I get “Invalid seem to have lost touch with one another, and it’s fortunate for entries in [Btrieve] section in WIN.INI” What did I miss? you that you’re still looking at Windows, and not at a black screen, a locked keyboard, and the perpetual flicker of a hard Perhaps the most frequent and least informative of the drive trying to find its boot sector. Access relies upon the DDF Microsoft Access/Btrieve error messages, this one sends you definition to tell it what to expect from Btrieve, and in this looking for a section in WIN.INI which may not even exist, and instance, the DDF lied. The error indicates that when Access gives you no indication of what you need to do when you get asked for a record, Btrieve found a longer record in the file than there. the one Access requested. Check your DDF definition to make The Btrieve Client Engine reads its initialization sure that all of the fields in the record are defined, and, if you parameters from WIN.INI or BTI.INI, depending upon which have variable-length records in your data files, that the last field version of Btrieve you’re using. The NetWare Btrieve NLM in your definition is a variable-length field type (either a NOTE reads its configuration options from the server BSTART.NCF or an LVAR type field) with a length sufficient to hold the file, configured using BSETUP. But Access requires the longest record in the file. [btrieve] section in WIN.INI regardless, with an options= initialization string. The file BTRIEVE.TXT in your \access I get a GPF when I try to attach a Btrieve table in Access. directory explains the recommended and required settings for these options. The recommended options line looks like this: Welcome to the wonderful world of modular software options=/m:64 /p:4096 /b:16 /f:20 /l:40 /n:12 /t:c:\btrieve.trn design. Your GPF means that somebody in the long chain of If you're using the local Btrieve version 5.10W DLL, this command between the disk drive and your application screen options line in WIN.INI will initialize Btrieve correctly. If stepped on somebody else’s memory address. Finding out who 11 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- you're not using this driver, however, the options that Access network error. In order to open a Btrieve version 6.x file, you checks and the options you end up using with Btrieve may not must have a Btrieve for Windows version 6.x engine. You be the same options, and this can lead to aberant behavior in won’t be able to open a Btrieve version 6.x file on a local hard Access. disk without the Btrieve for Windows version 6.15 Client The most important consideration is that Btrieve Engine, and in order to open a version 6.x file on a NetWare transaction precessing be enabled. Access uses transaction server, you’ll need to be running version 6 of the Btrieve NLM, processing for its own purposes, one of which is apparently to and attaching to the file using the client/server Btrieve for protect the DDF files from the possibility of destructive reads. Windows DLL’s and BREQUEST.EXE. Btrieve version 6.x, on If you're using the Btrieve Client Engine version 6.15, the other hand, will read and write Btrieve version 5.x format you'll need to place the correct options in the BTI.INI file in files. your \windows directory. Note that with the 6.15 engine, the meaning of the /t parameter has changed. You will now use the Can Access work with Btrieve files through the Btrieve VAP? /t parameter to specify the maximum number of transactions, and this number must be greater than zero (15 is the default). Yes. If you’re using a version of NetWare Btrieve The transaction file name is always BTRIEVE.TRN, but you implemented as a VAP, Access will attach to this data. Set up will need to specify a directory location for the transaction file Btrieve in exactly the same way you would when using the on the trnfile= line below the options= line. NLM version of NetWare Btrieve, with BREQUEST.EXE Disregard what the Access BTRIEVE.TXT file says running underneath Windows and the NetWare requester DPMI about where to put transaction files. In a multi-user, non-client- library WBTRCALL.DLL, and Access will never know it isn’t server environment, each Btrieve Client Engine requires its own dealing with the NLM. transaction control file, so make sure that this file is in its own directory for each installation of the client engine. When I export a table to Btrieve file, Access creates an If you're using NetWare Btrieve NLM, these options additional primary index field called M_I_C_R_O_S_O_F_T are set in the BSTART.NCF file on the server, using the even when I have a primary key defined in the Access table. BSETUP program. The NLM always uses the transaction Is there a way to disable creation of this 4-byte index field? control file BTRIEVE.TRN in the NetWare system directory, This field is created whenever Access has to create a but you must specify a maximum number of open transactions DDF definition for the file. The field is necessary because of greater than zero. some assumptions that Access has to make about the data. First Other parameters can cause problems as well. For it initializes enough records to hold the data, and then attaches instance, if your Btrieve configuration lacks a /u parameter, and to it and modifies the fields. If you attach to a table in a DDF you have data in Btrieve files which use Btrieve data file that has already been defined and simply modify the data compression, you won’t get the “Invalid options” message, but that it refers to, Access will not create this field. you will get “Unexpected error from external database driver [58]” when you try to read a compressed record. I finally got Access to attach my Btrieve files. But some Finally, this error is prone to appear quite suddenly in queries are unbelievably slow. What’s going on? an application that used to work. It usually manifests itself right after you’ve installed some other piece of software that uses Access is a relational database front-end, which is built Btrieve. It’s smart to check your [btrieve] options line after upon and which enforces the constraints of a database language installing anything Btrieve-related, to make sure the installation called SQL. Because Btrieve does not enforce SQL relational hasn’t shot your hard-won Access parameters in the foot. database structure on its data unless the data was created using Scalable SQL, Access is limited in the assumptions it can make Access opened my DDF, but I still don’t see any tables in it. about the file structure. It's safest to make no assumptions, and for any given SQL query, to perform a complete file scan, Either there are no tables in your DDF, or transaction matching the records returned with the query criteria. Not only processing is not enabled. If you’re running the Btrieve NLM, is this the safest approach, it’s also the slowest. The native chances are that Btrieve transaction processing is disabled at the Access driver for Btrieve seems to be willing to make use of NetWare server. You’ll need to LOAD BSETUP, the NetWare indexes to optimize its queries, but it will not use manual or null Btrieve setup utility, either at the NetWare server console, or at indexes, indexes which employ an alternate collating sequence, a workstation running the RCONSOLE utility. Use this setup or indexes which have any segments which do not correspond to program to increase the Number of Transactions parameter. complete fields. And, naturally, any query which selects records This parameter sets the maximum number of clients which may based on fields which are not indexed will require a complete have transactions open on the server at any given time. The file scan. Access 1.0 documentation seemed to imply that default value for this parameter is 15, but must be greater than segmented indexes on non-contiguous fields were not supported, zero in order for Access to attach to server-based Btrieve files. either, though this may not be true of Access 2.0. The way in which Access interprets a query will also When I use Access to try to attach my Btrieve version 6.x affect performance. Though SQL dictates the query syntax, it tables, I get the error message: “Disk or Network Error.” does not stipulate how a query is to be implemented by the You’re trying to open a Btrieve version 6.x file with a database engine. The only control the user has over Access, in Btrieve for Windows version 5.x driver. Btrieve returns a status terms of how records are to be retrieved, is at the SQL level code of 2, which Access interprets and reports as a disk or with the definition of the query. ²

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal BTRIEVE TECHNOLOGIES TECHNICAL CORNER

OCTOBER-DECEMBER, 1994 SUPPLEMENT TO BTRIEVE DEVELOPER'S JOURNAL MAD'S C OLUMN TECHNICAL Q&A - BTRIEVE V6 OPTIMIZATION

Hello and welcome to the fall issue of What are the issues involved in fine Btrieve Technologies Tech-Corner. tuning a Microkernel NLM? holding the page requested in cache, thereby reducing the number of disk hits It was exciting and interesting to see To fine tune the Microkernel necessary to read records. However, if and meet with everyone at THE SUMMIT. It engine, both the hardware and the NLM the data set being read is very select and had been awhile since I had the opportunity configuration should be examined. It is predictable, then the Microkernel to meet with many of you. And I appreciate recommended that any Database Server engine may be managing pages that will the time that everyone took out of their be at least a 486 66/MHZ machine and never be fully used. In that case, the excessively busy schedules to meet with us. that it be dedicated to providing fewer records per page the better. We received a lot of information from database services. Having fewer records per page is you directly on what product features The Microkernel NLM configuration also useful when using Concurrent (support for greater than 4GB files, nested options can affect performance. Transactions. Page locks are used to transactions), utilities (more complex and Unfortunately, it is difficult to make a determine concurrency in a Concurrent user friendly), and drivers (native ODBC) blanket statement that will guarantee Transaction. Fewer records on a page you need to maintain your competitive improved or optimal performance. In reduces the amount of page lock edge. The exposure of our Microkernel the answers to each of the questions contention that may occur in this type of Database architecture helped many of you below, we have tried to cover common transaction. understand BTI’s positioning in the dynamic aspects of how performance can be world of databases. affected by the NLM configuration, as I am trying to perform transactions in It was good to hear, as several of you well as other platform considerations. left the Q&A Session on Tuesday, that you the NetWare environment. What are now confident that Btrieve Technologies settings do I need, and should the files Can page size affect the way the be flagged Transactional? is alive, creating new products, adding key Microkernel performs? new features and looking towards the In order to perform transactions future. When choosing a page size for a (Concurrent or Exclusive), the One request: I’ve placed on file there are issues involved that can Microkernel Engine will have to be CompuServe a purposefully short survey affect performance. Using a page size configured to support transactions. The with features that you would be willing to that is an even increment of 512 (1024, Number of Transactions value will need pay for in a billable support program. We 2048, 3072, 4096) is suggested. In the to be set. For the NLM this is typically are currently amassing that information to NetWare environment, blocks are set to the same value as the Number of create programs that fit our customers usually read in even increments of 512. Remote Sessions. When a Microkernel needs. If you were unable to attend The If you specify a page size other than Transaction is initiated from an Summit, I’d appreciate your response. We those listed here, NetWare may read application, any server that the have not formally defined any programs yet two blocks for a single page read. workstation is attached to AND which and await your input. We hope to have There are at least 3 ways in which has the Microkernel engine loaded on these programs in place by early to midyear to determine page size. The first is to it, MUST be configured for transactions. 1995. utilize disk space, to put as many Flagging the file Transactional will records on the page with the least not invoke TTS. The Microkernel Engine amount of wasted space. The second is Wishing you a Happy, Healthy and Terrific to put only one record on a page. The start of the new year. third is to place as many records on a page as possible. All three scenarios IN THIS ISSUE have their pros and cons, and Happy Programming!! depending upon the usage of the system Technical Q&A: Btrieve Optimization...17 can affect performance. Mad Poarch When multiple records are on a The Future of the Microkernel...... 19 Vice President, Customer Service page, chances increase as the file is Btrieve Technologies, Inc. Technical Insights...... 22 used that the Microkernel engine will be

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal (NLM) uses the flag to indicate that all Btrieve Technologies technical requirement for RAM has been operations should be treated as single support staff has a 3 page white paper expanded. The use of a larger cache system transactions. The Microkernel on different configurations and memory provides for faster performance and Engine has an internal system consumption results. more efficient use of memory. transaction. A system transaction can be Because real mode memory Allocating too small of a cache for composed of several Microkernel consumption is such an important issue, the Microkernel engine can affect its operations. When the system Btrieve Technologies has taken a hard performance in any environment. The transaction is ‘synched’ all the look at how much memory the optimal setting is to minimize disk hits operations are committed to the Microkernel engine is using during the and maximize cache hits. Once a page operating system. The TTS flag tells the load process and once it is resident. is read by the Microkernel engine, the Microkernel engine to treat a single Btrieve Technologies has a Btrieve for optimal configuration would be to never operation on the file as a system DOS update that is available to all have the engine reread the page. transaction. Flagging files as registered users. We have been able to Default settings for this parameter are transactional will cause performance to trim conventional memory consumption generally sufficient. However, if there is decrease because of the inefficiency of by about 20K in some instances. memory flexibility in your system, give treating each operation as a system the engine more cache. Giving the transaction. The trade off is tighter data The 5.x engines had a maximum cache Microkernel engine too much memory integrity. size of 64K. Why do the new engines will not degrade performance. For the workstation products (DOS have a default size of 512K? and Windows) there is an /e option that The new engines require more Which Microkernel parameters affect provides transaction durability. When cache due to the nature of how the performance? the application receives a status of 0 on Microkernel Engine’s background writer See the table at the top of the page operation 20 (End Transaction) and the works. In essence, the new engine relies opposite, outlining parameters that do /e option is in use, this means that the heavily on pages being present in cache not directly affect performance and system transaction has synched and the to cut down on disk accesses. For both those that do. Options marked with an transaction is committed to the the DOS and Windows engines, the asterisk (*) are documented in the on- operating system. cache is allocated in upper memory line help files that come with the 6.15 areas. That is why the system version of the Microkernel engine. Accelerated mode in the 5.x engines allowed for quick cache access to files. Does 6.15 have the same capability? Accelerated mode implies that the WHO’S WHO AT BTRIEVE TECHNOLOGIES integrity of the file is not essential to the state of the system, and that the file will Doris joined Btrieve Technologies, Inc. be accessed in the quickest way as a founding team member in April of possible. In the 5.x engine this was 1994. Prior to that, she worked as a done by terminating pre-imaging and Doris Eldridge software engineer at SoftCraft, Inc. for relying on caching for Microkernel approximately six months, shortly operations. With the 6.15 engine and Acting Director of before the company was acquired by 6.x files, pre-imaging is no longer used Development Novell, Inc. She worked in the Database and system transactions provide for Products development group for Novell, caching of operations. first as a software engineer, and then In essence, accelerated mode and engineering lead for the NetWare SQL normal mode are one and the same, Doris’ primary responsibilities include product, from the time of the acquisition without the implication that data coordinating the releases of all of until the group was sold to Btrieve integrity is a low priority. If it makes Btrieve Technologies’ software Technologies, Inc. In August, 1993, she sense to open the file in accelerated products. She works with developers, assumed responsibility for the Quality mode, developers should continue to QA engineers, and technical writers to Assurance group for the Austin division use the setting. In the future accelerated define schedules, resolve technical of Novell. mode may reappear. issues, and set priorities. Other Away from the office, Doris, her responsibilities include supporting beta husband, Larry, and their two girls, Why does the conventional memory sites, reviewing documentation, and Jennifer, 14, and Nicole, 9, enjoy footprint for Btrieve for DOS 6.15 vary assisting in testing software. As acting spending time at their weekend place in depending upon the memory manager? head of development, Doris also the country, a short hour’s drive from Austin. Favorite vacation spots include The footprint can vary because of interacts with other departments such as marketing, sales, and services to South Padre Island, Texas and Estes the stub that is loaded Park, Colorado. Doris also enjoys with Btrieve. Depending on how a coordinate project work, and also handles the administrative issues for the playing softball in a recreational softball memory manager is configured, the stub league with her coworkers and friends. will have to make different real mode department. memory allowances. 14 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- Why is Btrieve for DOS 6.15 slower than Btrieve for DOS 5.10a? DO NOT AFFECT PERFORMANCE DO AFFECT PERFORMANCE Before the release of Btrieve for Number of Open Files Cache Allocation DOS 6.15, several of our beta Number of Handles Perform Index Balancing customers reported the improved Number of Locks Logging of Selected Files performance of inserts, updates, and Number of Transactions Create Files in Pre-v6 Format deletes. We were all concerned when Largest Compressed Record Size Create Files as Transactional (NLM) customers reported decreased Largest Page Size Transaction Durability * performance of reads with the released Number of Remote Sessions Transaction Bundling * product. Through customer test cases and development efforts we have been able to improve the Btrieve for DOS BREQUEST needs a larger /d parameter NLM. System configuration can be 6.15 engine’s performance. Engineering and that the Microkernel Engine also monitored and resource usage can be was able to identify a performance needs to be configured with a matching verified through the monitoring degradation when switching from real value. In this case BUTIL version 6.15 is facilities. to protected mode. setting the data buffer length to 33K. Changes have been made to If there are two applications that Consequently, the Microkernel Engine eliminate the degradation. These require the Microkernel Engine, what (NLM) and the /d for BREQUEST need engineering changes are in the Btrieve settings should be used? to be set to 35000. The other alternative for DOS 6.15.1 update. Users that were is to continue using BUTIL version 5.12. It is always possible that two registered by October 24th, 1994 will applications that require the What is the TIMER value in the receive the update in the US mail. The Microkernel Engine require different BTI.CFG file? update has been made available on settings. For example, some applications CompuServe in the BTRIEVE forum. The Btrieve for DOS version 6.15 is may require transactions while others forum has special instructions for architected to include a foreground and do not, or some may require an obtaining the update. a background task. In a single tasking extensive number of file handles. OS, such as DOS, task switching is not How can the system be monitored to The best rule of thumb is to adjust available, but it can be simulated. The insure that it is configured properly? to the highest settings, and leave settings Microkernel engine for DOS alone that enable specific functionality. The Microkernel Engine returns accomplishes this by hooking into the For instance, if compression is set, leave appropriate status codes for timer interrupt to simulate task it set. If your application does not configuration problems. For instance, if switching. In some configurations, other require compression it will have no there are not enough file handles applications may also use the timer affect on your application, however by configured, then applications will interrupt. changing it another application may receive a status of 87. If there is not If these applications are not well- ‘break’. Again, if a configuration is set enough memory specified by the cache behaved, the system may hang when improperly, the application will receive allocation parameter, a status 100 will multiple applications attempt to an appropriate status code indicating be returned. Most Btrieve status codes interface with the timer interrupt. The the problem. provide specific information regarding timer entry is used to disable Btrieve’s what has occurred to create a non-zero Typically, I use BUTIL.EXE to create my use of the DOS timer interrupt. By status code. files. Every time I try to create my files default, this entry should always be set All server versions of the with BUTIL 6.15 I receive a status code to Yes. You may need to disable the Microkernel Engine will provide a of 97. What is causing the 97? timer if you experience system hangs or monitoring utility. In the NetWare abends while running your Btrieve The status 97 indicates that environment this utility is BTRMON applications.

FUTURE OF THE MICROKERNEL

ever increasing number of platforms and great technological advantage over VOLUTION OF THE ICROKERNEL E M languages. Three central philosophies systems which have been scaled down DATABASE ENGINE have driven the technology and adapted from mainframe and development of these products: Make microcomputer implementations to run Since its introduction in 1982, efficient use of hardware and operating on stand-alone and network systems. Btrieve database technology is now in system resources, maintain the integrity This can be seen in a quick comparison its sixth generation. Changes over the of data, and maintain a consistent of the sizes and relative speeds of other years have included increased interface. database engines. functionality, network support, client- The fact that Btrieve was Btrieve has long been server capability, and support for an originally designed for the PC gives it a recognized for its performance, but

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal DATA MODEL DEPENDENT ACCESS MODULE FUNCTIONS Logical functions Schema (row, column, table...) Definitional functions Operations (join...)

Btrieve Scalable Object Custom Navigational SQL Database Data Model Relational Model Models Model DATA MODEL INDEPENDENT CORE ENGINE FUNCTIONS Physical data access Advanced caching MICROKERNEL DATABASE ENGINE Data integrity enforcement Transaction processing

Microkernel Database Engine Architecture

more importantly for its integrity, as is MICROKERNAL ARCHITECTURE including physical data access, evident by the fact that seven of the ten advanced caching, transaction leading accounting system vendors are The release of Btrieve version 6 processing, and data integrity built on the Btrieve database engine. marks the introduction of the enforcement; functions which are And as Btrieve has added Microkernel architecture, a new common to all data models. features over the years, the API has architectural model for the Btrieve One of the benefits of this remained remarkably consistent. So database products. The DOS and Microkernel architecture is that it allows consistent, in fact, that applications Windows Btrieve engines have been concurrent multiple data model access written for Btrieve version 1 will still run completely re-coded from a common C/ to the same data. Because the on top of Btrieve version 6 without C++ code base derived from the Microkernel limits itself to core database modification. And this consistency is NetWare Btrieve NLM. This code will functions, the design is entirely data- also enforced across platforms, allowing form the basis of the platform- model independent. Currently Btrieve an application to run on a single independent Microkernel Database Technologies has two data model computer, or in a client/server Engine. The Microkernel will handle all implementations which use the environment on a Novell network, of the core database functions, Microkernel to provide core services: without any modification. the Btrieve navigational model interface, and the Scalable SQL relational model interface. Because data integrity is enforced at the core level, both of these data access models can be run simultaneously against the same physical data. This architecture also leaves the door open to new database models such as an object model interface and tools to develop custom database models. Functionality can be added to the Microkernel to support these models as they evolve, supporting new types of applications and information collaboration. This design will also improve performance for existing Btrieve version 6.5 applications, which will benefit from new caching and multi-threaded processing performed by the

16 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- allocation table (PAT) and index pages.

BTRIEVE NAVIGATIONAL MODEL INTERFACE

Btrieve version 6 is shipping currently as an NLM, and as a client engine in Windows and extended DOS. Versions for OS/2 and Windows NT are currently in pre-release. Btrieve 6.5, scheduled to begin shipping during the second quarter of Scalable SQL version 4 the coming year, will feature triggers and stored procedures, improved Microkernel. And it will be fully multi-threaded engine which performs performance, support for nested compatible with existing applications, all of its disk IO in the background. A transactions, support for huge files, and once again because the basic interface complete transaction/isolation manager transparent two-phase commit. will remain consistent, though new eliminates the possibility of dirty reads. Enhanced log capabilities will include features will be added. And finally, Performance is enhanced by more single, durable log file maintained by a because of the common C/C++ code efficient internal algorithms, more separate thread, providing better base, this architecture will be easily efficient caching, and the addition of performance. The Windows and ported to other platforms. BTI already symmetric multiprocessing support. Windows NT drivers will feature a DLL- has it in place in NetWare, Windows, Planned Microkernel features only requester. and DOS, Windows NT and OS/2 are include transparent two-phase commit, both in pre-release. support for nested transactions which SCALABLE SQL RELATIONAL MODEL will be based on the currently INTERFACE implemented concurrent transaction MICROKERNEL DATABASE ENGINE support, capacity for files larger than Relational API’s will include the 4GB, improved continuous operation FEATURES native Scalable SQL API and ODBC. support which is not dependent upon ODBC support is currently provided by sparse files, eliminating the potential for In the current release, the Microsoft and Q+E\Intersolv. BTI is file corruption in the event of a system currently considering whether or not to Microkernel includes features to support failure during continuous operation and record set operations, otherwise referred provide direct ODBC support. allowing cross-platform support for SQL syntax in future versions to as extended operations. This includes continuous operation on platforms the capability to do partial record will continue to support Scalable SQL which do not implement sparse files. v3.x syntax. Future versions will add retrieval and record filtering. Huge Future versions of the Microkernel will record support is implemented at this compliance with the at least level 1 of support specialized data and key types, the SQL 92 standard, and will add level as well through chunk operations, particularly array keys, message/full-text effectively removing any limits to support for SQL3 level syntax with indexing, and object store. A scripting triggers, assertions, control statements, individual record size. Percentage language for stored procedures and operations, which indicate how far you and selected other syntax additions. event triggers will be implemented at Scalable SQL 3 is currently are along a given index path are also the Microkernel level, and core data supported in the current release, and shipping as an NLM, and as a Windows management functions will also include client engine. The extended DOS client they are useful not only in GUI support for database replication and applications for determining thumb engine is currently in beta. versioning. Versioning will allow the Scalable SQL 4 is slated to scroll positioning, but they are also one Microkernel to maintain a database in a of the tools which will enable true cost- begin shipping in the coming year. New static state based upon the assignment features will include full cost-based based optimization in future releases of of a version, while still allowing updates Scalable SQL. optimization using the Microkernel to the files which will not affect the percentage operations in its cost The current Microkernel engine versioned data. enforces data integrity constraints. If analysis algorithms. It will also add Planned performance support for SQL3 level syntax, and will your database is defined using Scalable enhancements for the next version SQL to enforce relational integrity, that include a scripting language for include IPX requesters, persistent implementing event triggers and stored is enforced at the Microkernel level, so caching across file opens and closes, that an application accessing that data procedures at the Microkernel level. and a consolidated log file. Future Plans are to add platform support on using another database model such as version releases will implement read- the Btrieve navigational model will not OS/2 and Windows NT with the version ahead caching, including a requester 4 release. be able to violate the relational integrity cache, self-tuning parameters, and of the data. The Microkernel is a true cache weighting , especially of page

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal increase the memory usage by a multiple of 16 ECHNICAL NSIGHTS bytes. For example, loading from the network T I directory AUS-TIN\BRO:W\LANDERSO\DOCS Btrieve for DOS v6.15.1 Update attempting to unload Btrieve, if it is loaded in produces the following results (an additional 32 high memory. This could be due to the bytes for each version): Below is a description of the critical problems combinations of other programs that are also 6.10e 34352 bytes that are fixed in the Btrieve for DOS v6.15.1 loaded high. If you experience such a problem, 6.15 33520 bytes product update, which began shipping to you will not be able to load Btrieve in high 6.16 33968 bytes registered owners of Btrieve for DOS v6.15 memory. Developer’s Kit and Client Engine in November. The increased memory usage due to the longer • Under some conditions, executing a BUTIL - path is caused by the allocation of a copy of the • If an error is returned on a Btrieve INSERT, STOP command caused the workstation to hang. environment plus the program’s filespec by UPDATE or DELETE operation and the This problem has been fixed. DOS when the TSR loads, and not something application then continues to insert records specifically allocated by Brequest.exe. without closing the file, the size of the Btrieve file can become very large. Scalable SQL Generates Microkernel • Under some conditions, the performance of Status 21 Status 62 on Update Chunk the read operations in Btrieve for DOS v6.15 is Scalable SQL for Windows 3.01 Btrieve 6.1x worse than with Btrieve for DOS v5.10a. When using the local Scalable SQL for Windows A status 62 (incorrect descriptor) can incorrectly • If a Btrieve file has an owner name with engine and the Client/Server Microkernel engine, be returned on an Update Chunk operation, encryption enabled, performing a massive insert a status 21 “Key Buffer Parameter is Too Short” specifically a RANDOM, INDIRECT operation. will cause unexpected errors or the machine will be returned for any query that requires a This occurs in the Btrieve for Windows engine may lockup. temporary sort file to be built. This error does 6.15.1 and the Btrieve for Windows requester • You can now access Btrieve files that are not occur when using the Client/Server Scalable 6.15.1. located on CD-ROMs. Previously, status 12 was SQL engine, or the local Scalable SQL for The problem occurs because Btrieve is verifying returned when you attempted to access a file on Windows engine with the local Microkernel that the structure used to describe the operation a CD-ROM drive. engine. does not lie in the memory area that is holding • When the first workstation issued a GET FIRST If the Microkernel configuration specifies both the data that will be used to update the data. So with a 200 bias, it did not release the lock local and server access, and the Scalable SQL the descriptor would look like: following an update operation. temporary sort file directory is specified as a Descriptor.dwSubFunction = • You can now specify the location of the directory on the local drive, queries that require INDIRECT_RANDOM_CHUNK_SUBFN; Btrieve transaction file (BTRIEVE.TRN) on the temporary sort files can be run against the local Descriptor.dwNumChunks = 1L; command line using the /t option. The format Scalable SQL engine. With this configuration, all Descriptor.dwChunkOffset =15; for the /t option is as follows: files located on the server will be handled by the Descriptor.dwChunkLen = 0x1000; /t:[number of transactions]:[transaction file] requester, and temporary sort files will be built Descriptor.lpChunkData = lpMemBuf; on the local drive by the local Microkernel You can specify either the number of wDataBufLen = sizeof(Descriptor); transactions, or the transaction file name, or engine. When Btrieve gets the call, it has the address of both. If both are specified, then the number of This configuration may provide performance ‘Descriptor’, being 241F:0234 for example. transactions must be specified first. If either improvements since the data being transferred to Then it looks at the value in value is omitted on the command line, then the and from the temporary sort file will not have to Descriptor.lpChunkData, being 1F49:0000 for value in the configuration file (BTI.CFG) applies. be re-transferred over the network. However, example. It then takes the length specified by this configuration does require that the If your application does not use transactions and Descriptor.dwChunkLen and adds it to the workstation have sufficient memory for the local you want to disable the Microkernel from address of Descriptor.lpChunkData, so 0x1F49 opening the transaction file, you can specify the and requester Microkernel components along + 0x1000 = 2F49. Because 2F49 falls below with the Scalable SQL local engine. The following: the ‘Descriptor’ address Btrieve assumes that the workstation must also have sufficient disk space actual Descriptor is in the memory area that will /t:0:nul to store the temporary sort files. The size of these be used to update the file, thereby causing a 62. • Earlier versions of Btrieve v6.x removed the files will depend on the amount of data satisfying However, because this is the Windows ability to create a segmented index that the query. overlapped with an AUTOINC key. This was environment, the two pointers specified by available in Btrieve v5.x. It has been restored Descriptor and Descriptor.lpChunkData are not BREQUEST.EXE Memory Usage with this patch update. Btrieve allows the related so using pointer arithmatic as described NetWare Btrieve 6.1x segmented key to overlap the AUTOINC key above does not work. The pointer values are only if the key number of the AUTOINC key is The amount of conventional memory used by selectors, therefore if the two pointers do not less than the key number of the segmented key. Brequest v6.1x varies slightly depending on the have the same selector value (241F for Descriptor and 1F49 for lpChunkData) they are • You can now load Btrieve for DOS in high version, and the directory from where it was not in the same memory area. The usage above memory, reducing the conventional memory loaded. However, the latest version of Brequest, would apply if they were segments. The solution footprint size. Some conventional memory will v6.16, takes 384 bytes less memory than is to allocate the descriptor with the data still be used for the DOS/4G interface. The Brequest v6.10e. segment: amount of memory used depends on the For example, loading Brequest with default memory manager configuration that you have parameters from the C:\ directory produces the installed. following results: hMemBuf=GlobalAlloc(GMEM_MOVEABLE, Also the amount of memory available for the 6.10e 34320 bytes (DWORD) (BUFFER_LEN + largest executable program is increased by about 6.15 33488 bytes Sizeof(Descriptor) + 20K bytes, as a result of better memory 6.16 33936 bytes sizeof(TEST_RECORD)); management by the Microkernel loader. Loading from different directories may produce lpMemBuf=(LPBYTE)GlobalLock(hMemBuf)); You may still experience problems when slightly different results - longer paths will

18 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- Btrieve File Corruption Btrieve file corruption is “isolate and reproduce.” Scalable SQL Programmer’s Manual Btrieve for DOS 5.10a Always make sure you start your tests with Documentation Error “clean” files by rebuilding any files that produced Scalable SQL for Windows 3.01 When investigating a case of Btrieve file an error during your investigation. corruption, there are four general causes. More There is a reference to the “Getting Started” than 90% of all Btrieve file corruption cases are Universal Naming Convention (UNC) manual in the Scalable SQL for Windows caused be problems in categories III and IV. Programmer’s manual in the last paragraph on I. File corruption is being caused by a problem and BREQUEST p4-28. This should refer to Chapter 3 (Query with the Btrieve engine. If this is the case, the BREQUEST 6.10e, 6.15, 6.16 Optimization) in the Scalable SQL Reference corruption should be reproducible. To isolate UNC is not supported with BREQUEST.EXE. A Manual. Btrieve as the cause, you must provide status 12 (file not found) will be returned if the Developer Support with a test case that Universal Naming Convention (UNC) is used to Redirecting Pre-Image and LCK Files on demonstrates the problem. This test case can be qualify a file path on a Btrieve OPEN operation NetWare either your application, or a test application when using BREQUEST.EXE. Btrieve for DOS based on the code in your normal application. For example, an OPEN request for the file \\AUS- Btrieve cannot be identified as the cause without TIN\BRO\OS2\LHEATER\TEST\PATAPP.DTA In a single-volume NetWare environment, a test case. Btrieve logging and the Rollforward will return a status of 12. Do not use the Btrieve pre-image files for 5.x format files, and utility can also be utilized when trying to Univeral Naming Convention (UNC) to specify LCK files used by Btrieve v6.15 in MEFS produce a test case. Similarly, in the Btrieve 6.x SERVER/VOLUME with BREQUEST.EXE. (MultiEngine File Sharing) mode can be re- NLM environment, the BRECORD utility can be If Server/Volume must be specified, then directed to a map root drive to avoid giving users used. Always make sure you are running the SERVER/VOL:\path is the correct way to specify CREATE rights in the directory containing the latest version of Btrieve with any available the name of the path. This is considered to be Btrieve data files. patches applied. Patches can be downloaded NetWare’s convention for file specification. When using a client version of Btrieve (Btrieve from CompuServe, or you can contact for DOS, OS/2 or Windows) in a NetWare Developer Support and request that the patches environment, administrators may want to be mailed to you on diskette. If Btrieve is found Opening Files on a CD-ROM Drive configure NetWare so that users have rights to Btrieve for DOS v6.15.1 to cause the file corruption, the problem will read and write to the directory containing the only be fixed in the current or next version of Btrieve for DOS v6.15.1 will let you open a Btrieve data files, but not create new files in that Btrieve. Development will not fix older versions Btrieve file on the local CD-ROM. However, directory. However, without Create rights, that are no longer shipping. there are some issues to be aware of: Btrieve cannot access the data files, since it II. File corruption is being caused by the A CD-ROM drive is handled as a network drive. cannot create the pre-image files used when application. If the application can make Btrieve The default file sharing mode on a network drive accessing Btrieve files in the 5.x format, or the calls successfully, but data returned by Btrieve is is MEFS (multi-engine file sharing). Since the CD- lock file needed for MEFS. corrupted, or if the workstation hangs, the cause ROM is a read-only device, Btrieve cannot create By default, Btrieve creates the pre-image files in can usually be found in the application. the lock file when it tries to open the Btrieve file. the same directory as the Btrieve data files. Common causes include overwritten data Status 81 (lock error) is returned in this situation. Btrieve can be configured to redirect the pre- buffers, position blocks or memory in general. You can avoid this error in the following ways: 1. image and lock files to a different drive with the / Utilities such as POSCHECK can help track Open the file with the SEFS (single-engine file i: option, for example: down some of these errors. Various Btrieve sharing) bias. 2. Specify SEFS for remote files in Btrieve /m:38 /p:4096 /e /i:G debugging utilities are available for download BTI.CFG file. 3. If MEFS is specified, redirect the from Compuserve, or you can contact Developer This configuration tells Btrieve for DOS to create lock file using the /i option to a different drive. Support and request that the utilities be mailed to the pre-image and lock files on drive G you on diskette. (whatever that might be mapped to). Drive G must have the same directory structure as the III. File corruption is being caused by hardware Loading BREQUEST.EXE High drive with the Btrieve files. For example, if the incompatibility or malfunction. Check all the NetWare Btrieve NLM 6.10 workstation and server hardware. Hardware- Btrieve file FILE1.BTR is in the directory When BREQUEST.EXE v6.10x is loaded into F:\APPL\DATA, the pre-image file FILE1.PRE will related causes can be difficult to isolate, and memory, the transient portion of the TSR be created in the directory G:\APPL\DATA. sometimes may require you to swap requires a maximum of 173KB. The only Since all users must share the same pre-image components. If the cause can be proven to stem memory areas below one MB with enough files, everyone must use the same redirection from one particular workstation, it is usually space to accommodate this driver are the path and a local drive cannot be used. One hardware related. When running a NetWare conventional memory area and the Upper solution is to set up the matching directory LAN, always make sure server hardware, Memory Block (UMB). Therefore, when structure on a different volume, and map the G: workstations, LAN cards and any other BREQUEST.EXE is loaded high, it will be placed drive to that volume. In an environment where components are NetWare-certified. in the UMB if space is available. After the TSR the server only has one volume, the only way to IV. File corruption is resulting from interaction has loaded, the resident portion occupies 34KB. set up a separate directory for pre-imaging where with another software component, including BREQUEST.EXE can only be loaded high if the other TSRs, memory managers or device drivers users will have Create rights is to use the MAP IPX (IPX.COM or IPXODI.COM) driver has been ROOT command. For example, if the Btrieve at the workstation, as well as LAN card drivers loaded first. NETX can be loaded either before or data files are in the directory F:\APPL\DATA, and other NLMs at the server. Remove all after Brequest is loaded. If an attempt is made to unnecessary components and see if the problem another directory can be set up like load BREQUEST.EXE high after IPX and NETX \PRE\APPL\DATA where users are given Create persists. If not, add the components back in one have been loaded high, the system may either at a time to see which one may be causing the rights. Then, issuing the command: MAP ROOT hang or return an 80386 Processor Exception G:=\PRE will set up a map root drive that can be conflict. Also, make sure that each component is error if there is not enough available memory. used in the Btrieve command shown above. The the current version and is NetWare-certified for BREQUEST.EXE can also be loaded in base the NetWare version running on the server. pre-image files will be successfully redirected to memory with the drivers loaded high. the \PRE\APPL\DATA directory instead of the The best approach to take when investigating \APPL\DATA directory.

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal Set Directory Operation Will Not Cross Case Insensitive Ordering with Drives NetWare SQL CURRENT V ERSIONS NetWare Btrieve NLM 6.10 NetWare SQL 3.00 The Btrieve Set Directory (17) operation does not Case-insensitive sorting of string fields (i.e. Btrieve Data Management Products change the directory if a path on a different drive ‘SMITH’ is sorted the same as ‘Smith’) is Btrieve Engine for DOS...... 6.15.1 is specified. For example, if the current working accomplished in NetWare SQL by creating an Btrieve Developer Kit for DOS...... 6.15.1 directory is F:\APPL, and a null-terminated index on the table with the CASE attribute Requester for DOS...... 6.16 KeyBuffer of G:\DATA is passed to the specified for the field. For example, CREATE Btrieve Engine for Windows...... 6.15.1 SetDirectory operation, a status 0 is returned but INDEX NameSort ON Patients (Last^Name the directory is not changed. This result occurs CASE). Subsequently, SELECT * FROM Patients Btrieve Developer Kit for Windows..6.15.1 even if F: and G: are mapped to the same server ORDER BY Last^Name will use this index and Requester for Windows...... 6.15.1 and volume. Subsequent attempts to open a file return the data sorted without regard to case. Btrieve Developer Kit for OS/2...... 5.10 that is located in G:\DATA returns a status 12 If no index exists for the fields specified in the Btrieve for NetWare NLM...... 6.10c (File Not Found). ORDER BY clause, NetWare SQL creates a DOS BREQUEST...... 6.10e If the Set Directory operation is given a path that temporary sort file to achieve the proper Windows WBTRCALL.DLL...... 6.10b is on the same drive as the current working ordering. Here, there is no way to specify that OS/2 BTRCALLS.DLL...... 6.10b directory, such as F:\BTRDATA, it works the temporary sort file be built with case- correctly. insensitivity. So, the application must first create This problem exists with BTRIEVE.NLM v6.10c, the index with the CASE attribute, and then issue Scalable SQL Relational Data and all 5.10x versions of client-based Btrieve for the select statement. Management Products DOS, OS/2 and Windows. In some cases, this procedure is not possible; for If the Btrieve files to be accessed reside on a example, in a joined view where the ORDER BY Scalable SQL for Windows...... 3.01 different drive than the current working fields are not all from the primary table, there is Scalable SQL Developer Kit for directory, the drive and path along with the file no way to create such an index. In this case, the Windows...... 3.01 name can be specified in the Open operation application could create a temporary file with the Requester for Windows...... 3.01 instead of using the Set Directory operation. appropriate index, insert the selected records into Scalable SQL for NetWare this table, and then read the data from the The problem does NOT exist in the v6.15 (Server Edition)...... 3.01 Btrieve for Windows client. temporary table using its index. Requesters: DOS SQLREQ.EXE....3.01 Another alternative is to use the Relational SQLREQS.EXE...3.01 Scalable SQL for Windows Registration Primitive functions. The xOrder primitive allows the CASE attribute to be specified for sorting the Win WXQLCALL...... 3.01 Scalable SQL for Windows 3.01 view; this applies to both existing indexes and OS/2 XQLCALLS...... 3.01 If someone purchases both a Single-User copy temporary sort files. XQL for DOS...... 2.11b and the Unlimited License copy of Scalable SQL, XQL for OS/2...... 2.11 and attempts to install them in the same place Get Previous After Inserting Duplicate (such as C:\BTI), the registration program will not Key Values run for the second installation. The files installed Query and Reporting Tools by these two products are identical; the products Btrieve 5.x only differ by the license. The single-user engine A GetPrevious (opcode 7) operation immediately Xtrieve for DOS...... 4.11e is not crippled in any way. So, the double after inserting a record with a duplicate key value Xtrieve for OS/2...... 4.11e installation won’t cause you to “lose” any files, should return the previous duplicate. However, but the registration program thinks it’s already under Btrieve v5.10, the record with a smaller been run, and does not run again. key value is returned instead. HOW TO REACH BTI To complete the registration for the product For example, if a file has two records with key being installed second, just re-install it in a values AAA and BBB and then three records are different directory so that the registration inserted with the same key value of CCC, a Btrieve Technologies, Inc. program will run. GetPrevious operation after the third insert 5918 West Courtyard Drive should return the record with the second Suite 400 Phantom Users in BTRMON instance of key value CCC. Btrieve for DOS Btrieve 6.10 v5.10a returns the record with key value BBB Austin, Texas 78730 instead. When a Btrieve application is running, a user’s The correct record is returned on the name is displayed in the monitor utilities when GetPrevious operation with Btrieve v6.x. When Phone: (800) 287-4383 querying about user information. If a user has using Btrieve v5.10a, a workaround would be to (512) 794-1719 been logged out from the file server with the SPX issue a GetPosition (operation 22) followed by a session still intact, no user name appears in the Night: (512) 794-1731 GetDirect (operation 23) after the insert and monitor’s user name list. The space for the before the GetPrevious. Then, the GetPrevious Fax: (512) 794-1778 users’s name is filled with blanks. returns the appropriate record. Btrieve itself does not keep track of user names, CompuServe: GO BTRIEVE only network addresses. It is the monitor utility You may also contact Btrieve Technologies via (BTRMON) that is querying the bindery to find the Internet. The BTI Internet Domain Name is the user name information. So Btrieve is not btrvtech.com and user names consist of the aware that a particular user is associated or NOT person’s first initial followed by up to seven associated to the address it is talking to. characters of the last name. For example, Mad Poarch’s address is [email protected]

20 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- marketplace to try to buy Intuit, the makers of Quicken, as well as take over the electronic cash disbursement and tax filing systems associated with Intuit. In addition, Microsoft has aggressively gone after a new relationship with BTI. If Microsoft thinks this sounds like a good area to be involved with, you should pay attention - your Btrieve skills may be the key to your cashing in on the excitement.

1994 - Universal Btrieve Use by ASVs

Btrieve has been an important offering to accounting software vendors, as is evidenced by its almost universal acceptance by the industry. While describing the attributes that make it so attractive to the readers of this publication is “preaching to the choir,” business information systems like accounting software have been and will be as important to Btrieve as Btrieve has been to accounting software. Toward the beginning of microcomputer accounting, Btrieve Based there were COBOL and BASIC, the remains of minicomputer code brought over to the new microcomputers. Solomon Accounting Software was the eccentric, using MDBS as their database manager. Then Softcraft offered a new choice: Btrieve. By Eric E. Cohen, CPA ASVs who were not hindered by ported minicomputer code Email: [email protected] were able to move more quickly to Btrieve. On the high-end of CompuServe: 73631,67 off-the-shelf products, Great Plains (Great Plains Software, 800- 456-0025) and Platinum (Platinum Software, 800-999-1809) In 1994, every major accounting software vendor were early users of Btrieve. Xtrieve was their readily available (ASV) announced the adoption of Btrieve as their database report writer. Macola (Macola, Incorporated, 800-468-0834) manager of choice. In addition, that year’s spin-off of Btrieve joined the Btrieve bandwagon in 1989. Btrieve’s speed and Technologies from Novell makes the future installation of that integrity were the greatest reasons Macola and Platinum gained Btrieve-based accounting far more likely on non-Novell reputations as worthy replacements to minicomputer-based operating system platforms. These changes in the marketplace software, at a fraction of the cost, with speed and reliability to make a look at accounting software important for the Btrieve match. developer. RealWorld (RealWorld Corporation, 800-678-6336), This column is the first in a three part series on Solomon III and IV (Solomon Software, 800-879-0444), and Btrieve-based accounting and business information management ACCPAC Plus (Computer Associates International, Inc., 800- software. Over the next three issues, it will introduce accounting 225-5224) introduced Btrieve versions over the last two years. software and peripheral offerings, including low, medium and Other high-end accounting holdouts, M*A*S 90 (State of the high-end selections, and highlight opportunities for developers to Art, Inc., 800-854-3415) and CYMA (Cyma, 800-292-2962), be involved. The second article will concentrate on low end have announced their future adaptation of Btrieve. products and vertical applications, and provide a resource list for finding out more. The third article in this series will deal with high end packages, add-ons that augment the software’s capabilities, and management of practice issues. Mr. Cohen is the owner of Cohen Computer Btrieve developers have two primary reasons for Consulting, an accounting software consultancy in reading this series of columns: to find out about new areas of Rochester NY. He trains CPAs (certified public opportunity for expanding business (the ASVs are advertising accountants) and CAs (chartered accountants - this ability on your behalf!), and to learn how the new software Canada) in trends in computer technology and offerings can help better manage the developers’ own accounting software. His articles have appeared in businesses. After all, every business (including yours) has to Accounting Today, Audio Microcomputer Report, keep those books and records for tax time. Developers often Buffalo Business First, CPA Software News, CPA suffer the “Shoemaker’s Children” syndrome: internal systems Journal, Journal of Accountancy, Rochester Business suffer compared with those done for clients. Journal, Small Business Controller and other There are those two great inevitable events: death and business and professional publications. He wrote the taxes. Death is limited to twice for humans, according to book Guide to Customizing Accounting Software, and Biblicists, and nine times for cats, according to fable. Taxes portions of numerous other books on implementing come into play at least on an annual basis. What does this have computer technology. He can be reached on the to do with software? Internet at “[email protected]”. Microsoft Corporation thinks enough about the

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal Why was Btrieve so important for product as being compatible with their own. Clever developers can add capabilities to others’ accounting? software - if it is in a standard database file structure, like Btrieve. One example, an executive information system (EIS) LANGUAGE INDEPENDENCE called Forest & Trees (Trinzic Corporation of Waltham, MA, Btrieve did not care what programming language you 800-952-8779 or 617-891-6500) provides a visual dashboard to a used to speak to it. That meant that ASVs could use their legacy business's operations. Borland International Inc.’s defunct COBOL or BASIC code with Btrieve, while considering newer ObjectVision was another powerful tool for augmenting the technologies. This provided an upgrade path to both the accounting software packages’ capabilities. developers and the end users while new programming languages were being phased in. CONSULTANT AND END-USER PRESSURE “When are you going to have a Btrieve version?” SPEED Finally, ASVs moved to Btrieve because consultants and end- As the flexibility of the accounting packages increased, users were demanding it. As third party Btrieve tools like report the reviewing magazines changed their reviews to reward speed. writers became more sophisticated, users had to invest more in Since an “Editors’ Choice” award could mean millions of mastering the technology. For consultants supporting multiple dollars in additional sales, Btrieve brought an instant advantage accounting packages, having them all on Btrieve meant a greater over the non-Btrieve competition. return on software and training investments. Speed is an important issue to the large companies considering microcomputer-based accounting software as part of BUT - WHAT OF THE FUTURE? their “right-sizing” or down-sizing activities. Mainframes and In the DOS world, where there is limited inter- mini-computers have their place in high-transaction volume application communications (IAC), a standardized database was businesses; Btrieve on a micro dared to compete. vital to provide common links between products. How about in the Windows world - the land of Dynamic Data Exchange INTEGRITY (DDE) (or was that Dwight David Eisenhower?) and Open Users of COBOL, BASIC and MDBS systems on Database Connectivity (ODBC)? Btrieve provides speed microcomputers are accustomed to corrupted files and lost data. underneath the Windows veneer that current IAC can’t match. Btrieve has the reputation being bullet-proof. As “mission- How about referential integrity in the database, password critical” jobs, computer applications on which the company security and database dictionaries? Where Btrieve works fine for depends for basic business operations, moved to smaller and growing companies, big companies are concerned microcomputers, a high level of integrity and reduced risk of about software passwords being bypassed by data access tools. data corruption was necessary. Btrieve met this requirement, Using products like Microsoft Access to get at accounting data along with standard tools to recover data. using Btrieve opens the door to anyone to see what the boss makes. Access also limits the number of fields you can access in NOVELL’S SEAL OF APPROVAL a file. The youthful BTI has the tall task of making Scalable In the early 80’s, the single-user, single-tasking MS- SQL compete with the Sybases and Oracles of the world with DOS operating system environment was a frustration. Many their mature development tools. Possibly it will be the support companies tried to offer ways around this limitation, with multi- of the ASVs that will propel BTI into greater dominance. user DOS extensions and local area network solutions. Accounting software vendors need an open architecture However, few businesses were comfortable with any method of to make sure future technologies don’t pass them by. What are having multiple DOS users share a common database. the trends we are seeing in accounting software development? The failure of OS/2 in 1987 to meet the multi-user expectations of users may have been the catalyst that propelled ACCOUNTING SOFTWARE TRENDS Novell’s NetWare into the limelight. Novell’s networks, once known as “notworks”, emerged as the most popular way to get multiple users into an accounting database for those who wanted Windows to use DOS applications and stay away from Unix/Xenix. The race is on to sell Windows-based accounting. Only Novell’s purchase of Btrieve that same year made choosing a few vendors have had any success in putting even a limited Btrieve as a database manager the logical choice for anyone subset of their DOS functionality on the Windows market. wanting to make sure their accounting software would be As with all development, ASVs are feeling the push for compatible with Novell for years to come. graphical user interface (GUI, largely under Microsoft Windows) development. Windows brings a characteristic loss of THIRD PARTY SOFTWARE AND TOOLS TO ADD speed to most accounting applications. However, the belief that Windows-based accounting should be easier to use than DOS CAPABILITIES (by definition) has propelled GUI accounting’s popularity. Partnerships can make each partner stronger. ASVs Developing around Windows means a proper multiple saw the opportunity to use partnerships to make their own document interface (MDI), so that multiple accounting screens business situation stronger. If the ASV did not have to develop can be viewed simultaneously. An order entry person can field their own contact management package, depreciation module or phone calls while switching to another window for cash entry in report writer, they could concentrate on their basic product. In free moments. Windows also brings font and printer control and addition, they could capitalize on the popularity of a third party

22 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- a more standardized menu structure for finding your way Other international features by definition mean around. expanded foreign currency capabilities, foreign language options One of the biggest areas in Windows development, (like Kanji or cyrillic), and tax and business reporting needs for however, is the screen customization and programming-like other countries (like VAT). functionality built into the new breed. The next generation packages are bringing screen modification tools not unlike Emerging technologies Visual Basic or Microsoft Access: fields can be moved, hidden, Accounting software can no longer stand on its own. renamed, defaulted, and code can be added behind forms and Demands by large companies on other large companies and on fields to add functionality. This ability to augment the software small companies has meant that most businesses are being is highly publicized, opening doors for developers to create new confronted with today’s technologies “of the future”. functions for the software that does not interfere with the Bar coding printing and data input makes data programming source code. collection tasks like taking a physical count of inventories far more efficient. In addition, some large companies will only do Large Company Features business with companies that bar code their shipments and Just as the Honda Civic of the 90’s is the size of the documents. Honda Accord of the 80’s, so accounting software’s features are Electronic Data Interchange (EDI) is “the application migrating upward. The high end packages are trying to become to application exchange of business transactions using public the foundation for international companies’ downsizing effort. standards for information content” (EDI World, June 1994) - or, This has been met by vastly increased field sizes and efforts to in other words, a set of standards, with names like ANSI X12 incorporate new technologies. and EDIFACT, for the way information is formatted and Increased field sizes are one of the most important communicated by computer between businesses. These items for working with large companies. Chart of accounts, “packets” of information include purchase orders and purchase orders and invoice numbers are unusually (and acknowledgements, inventory inquiries, invoices, and unnecessarily) long in larger businesses. In addition, conversion notification that cash is being transferred to pay a bill. In tones of dollars to Lira or rubles can choke most systems. reminiscent of CB radio, you’ll now hear Accounts Payable

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal clerks asking, “Where’s your 820 (EDI payment advice), good enabling) gets information to the people who need it buddy?” electronically. EDI spans barriers, like time zones, language These necessary hooks into accounting software make it differences, or personnel cutbacks in data entry staff, hindering a ripe marketplace for developers to provide instant solutions, communication between business partners. It also automates while the ASVs determine their own future direction. business tasks, like inventory look-ups. With EDI your customers can send electronic request to review your stock ACCOUNTING IMPORTANT FOR BTRIEVE availability without tying up your personnel’s time or making DEVELOPERS you face the technical and security problems of giving customers Although accounting software is no longer the primary direct access to your computer system. driver for computer installations, it is still a main driver. Your Computer mailboxes on third party communications clients are probably asking for advice on which package to buy services like IBM, GE, AT&T and Control Data provide 24 and how to best customize their software to meet their needs. hour a day dial-up capabilities for “one step” drop-off and pick- You need to keep your house in order, too. Following is a brief up of the packets. These VANS (Value Added Networks) act as review of accounting software’s major pieces. intermediaries and can provide many additional helpful services. Using these mailboxes, for example, companies in Japan, Africa and India can leave purchase orders for a vendor in Colorado ACCOUNTING SOFTWARE “MODULES” during their respective business hours, which the Colorado AND WHERE THEY FIT IN company retrieves when they open the next day. As with bar coding, many large retailers like Wal-Mart Accounting software is general sold by modules, which and K-Mart will only do business with companies that can are associated with a business department or set of tasks. receive orders and acknowledge those receipts via EDI. Although each vendor offers a different set of products, it is Document image processing systems use the computer important to know the most popular modules and their role in as an electronic filing cabinet. Hooked in with accounting, users business. can view supporting documentation (scanned into the computer) The “Big Three” in accounting are the General Ledger when reviewing the results of operations. (GL), Accounts Receivable (AR) and Accounts Payable (AP) Lotus Notes integration (and other electronic mail modules. These are the most popular modules and found in most businesses and departments. Most larger businesses track their accounting on the accrual basis. That means that sales are entered when they happen and expenses when they are owed. Smaller businesses and service-based businesses often do their accounting on the cash basis. In cash-basis accounting, sales and expenses are recorded when cash is transferred, not when it is owed. Although accountants generally agree that accrual basis accounting is better for managerial oversight, it is important that the system can track your business results in the way you need to report it for tax and reporting purposes.

General Ledger The General Ledger (GL) is the place where all of the financial information of the company gets summarized. Information from all of the other modules flows to the General Ledger to be analyzed, summarized, and presented in financial statements. Budgets and prior year information is maintained in the GL so management can compare the results of operations with prior years and with forecasted results. Most GL packages will let you automatically bring over accounting information from other modules without retyping. Some will also let you bring in summary information from other systems in a ASCII, Lotus worksheet or dBase III format. Development opportunities: interfaces from custom developed packages; automatic links out to spreadsheets.

Accounts Receivable and Cash Management The Accounts Receivable (AR) module is the storehouse for customer related information. Depending on your industry, your customers may be known by other terms, such as clients or patients. The basic information about your customers (like addresses and primary contact names)and salespeople are kept here. Cash receipts, finance charges, monthly statements

24 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- and aging reports are processed here. For smaller installations, Human Resource (HR) systems track additional some basic invoicing capability in the AR module may be information, such as the results of reviews and raise histories, as helpful. well as skills and training. AR works closely in conjunction with Order Entry and Payroll systems feed information to job cost systems Billing systems. for analysis of the actual costs of a job, including labor, Cash Management tools may be as simple as cash materials and overhead. expectation reports to full credit monitoring systems. Development opportunities: integration of timeclock Development opportunities: visual dashboards of cash systems; Union and other special reporting. position, links from custom order entry systems, integration with EDI systems for cash received. Inventory Management For businesses that resell or manufacture, keeping track Accounts Payable and Bank Book. of the costs and usage of inventory is important. Inventory The Accounts Payable (AP) module automates the Management (IM) systems track the quantities on site, the check writing process. The AP system can print checks for you current demands for each item from internal and external or track checks you have written by hand, as well as recording sources, and expected replenishments. They also assist in doing bank charges and electronic transfers. physical counts. Accounts Payable works closely in conjunction with Each industry has special tracking needs. Retail Purchase Order systems. environments may need to have multiple item numbers (UPC, Bank book systems help with check reconciliation and internal, manufacturer’s) for the same item. Manufacturers need maintaining bank balances. to track the identifiers of engineering drawings and instructions Development opportunities: Integration with ASCII for manufacturing (routings and bills of material) for each item. files from banks for check reconciliation; links from AP to AR Users need to be able to quickly discern the investment in their for agents, billbacks of expenses. inventory, as well as the availability of items for use or sale. Development opportunities: work in process systems; Payroll and Human Resources receiving and purchasing systems. The fourth entry in the Big Three is payroll (PR). Although most accountants recommend that smaller businesses Order Entry use outside firms to process payroll, due to the ever changing Presumably every business is in existence to make payroll tax laws and rules, internally prepared payroll is helpful money. Tracking the requests for product or services and the for job oriented businesses. Payroll systems collect employees’ fulfillment of those requests goes by different names for each time, print payroll checks or direct deposit stubs, and prepare industry. Retail businesses have “point of sale”, where most reports for taxing jurisdictions, government requirements and management purposes. See Accounting on page 36... Consider these questions taken from a letter I recently received: “How much should I pay a programmer to write code? How should I handle any bugs I might find, in terms of a contract? What other items should a contract contain? Where do you find a good programmer and how do you tell? What about confidentiality and nondisclosure?” These are very good questions — not just for the potential consultant or programmer but also for the party who hires the contractor. Before I start trying to answer these questions, I’d like to lay some ground work and discuss the overall matter at hand. To my mind, the central issue in contractor-to-contractee relations is trust. The contractor runs a risk in undertaking a contract. Will he get the estimates right, or will he wind up Programming for Hire working for next to nothing? Will his client pay on time — or at all? How does the contractor protect himself? By Jon Burke, Business Logic For the client, the questions are just as tough, if not Email: [email protected] tougher. Typically, the client is hiring knowledge and CompuServe: 75470,3115 experience over and above what they have available to themselves. This means that whoever they hire will be performing magic — something they will find difficult or The computer industry hasn’t turned out at all as I impossible to evaluate during the development cycle. So they expected. Since the early 1980’s when personal computers have to rely on trust, and trust doesn’t come easily. Will the where just making their debut, I expected the computer industry contractor get the job done at all, and if so, will it be on time? to go the way of the automotive field. With automobiles, the And the Big Question: How Much Will It Cost? small, creative independent manufacturers were pretty much on While these questions remain unanswered, tensions their way out by the late 1940’s. By the 1960’s the independents inevitably rise, and the job at hand gets a lower and lower were completely gone, and only the giant mega-corporations percentage chance of successful completion. It’s been my remained. That’s how I expected the computer industry to fare. experience that, if the client and the contractor are both But I was wrong. Instead of the large scale calcification seriously afraid about how the job will come out, trouble is on I expected, the giants in the computer industry rose up, were the way. The converse is likewise true: If everybody concerned struck down, and left in their wake a is convinced of each other’s ability and good will, conglomeration of small, hungry, A large part of insurmountable problems seem to fade away and the likelihood innovative firms that are vying of the project reaching a successful conclusion approaches successfully for overall the industry has certainty. control of the industry. So, I believe it’s absolutely fundamental to create and Certainly, IBM, DEC, gone to small shops and maintain trust throughout the life of a project. A lot of my and Hewlett Packard answers to other questions revolve around this way of thinking. are still around. independent consultants. Keep this approach in mind and a lot of the other questions start However, a quick to answer themselves. These gunslingers are grab- look through any trade paper will bing a larger and larger show hundreds and How much should I pay a programmer to thousands of small write code? piece of the pie. companies — some still working nearly out of back yards — hassling On the surface, this looks to be a simple question, and I the major players in the field, and often winning. And this trend guess I could just brush it off with a quick dissertation on seems to me to be on the upswing. programming rates. However, the real meat of this question Software application development is following the same isn’t so much the rate one pays or receives for programming trend. Large companies such as Platinum have recently had their services, but rather how the overall project gets paid off, what it difficulties, and many aren’t doing very well at all. A large part costs in the long run, and how payment is tendered. To my of the industry has gone to small shops and independent mind, this is a much more important question. I’ll answer both. consultants. These gunslingers are grabbing a larger and larger Programming rates vary considerably based on a piece of the pie, and this has given rise to an unusual problem. variety of indices. Geographic location, the programming In spite of the fact that small companies have been a part of the language in question, the type of task to be programmed, all American business scene since before George Washington, it play a part. Typical programming pay (money received by the seems that not many people know much about how these contract programmer) in Southern California runs from maybe companies operate. Everyone knows how to buy a car from $22.00 per hour on the low end to perhaps $150.00 per hour on General Motors, but how many would know what to do if they the higher end, with the majority getting between $32.00 to wanted a Tucker instead? The same applies if you’re the one about $65.00 per hour. Usually, the programmers receiving the making the car — how do you get started and stay started? lower pay rates are acting as subcontractors, so it’s rare that the (800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal client will pay rates in the twenty to thirty dollars an hour range. payment, the client got more and more uncomfortable. Huge You can expect client rates to be between 20% and 40% higher sums of money were piling up, and there was no commitment than what the subcontractor programmer receives. Keep in mind on the programmer’s side, other than his professionalism, that that these figures are pretty rough. the project would actually reach completion. The project finally There are other factors that come into the equation besides finished, about 15% over budget (a not unusually high overage raw cash. Flexible hours, work that can be in this kind of project), but the client performed off-site, location of the site, was a nervous wreck, and the and the type of work all figure into it. If the ΤΟ ∆Ο ΛΙΣΤ relationship had deteriorated work can be performed away from the substantially. I don’t recall the ι. δατα κοµπρεσσιον αλγορυθµ client site, or if the hours during which the ιι. ρεΦορµατ ′αρδ δισκ programmer getting any more work ιιι. ∆ΕΒΥΓ ΠΡΟΓΡΑΜ programmer must work are not cast in σωκ θε βυµς φορ α λοτ οφ from that client, and the software stone, this can count for a large reduction δραχµα created during that project deteriorated βοι αρε θη γοννα ω µε in rate of pay. Alternately, if the work φορ θις from neglect. Within one year, the must be done between the hours of 9:00 client company removed the software. and 5:00 every week day at a factory Everyone lost. The alternative, location, the client can expect to pay however, is justifiably scary for the premium prices. contractor. How can you say what will Long term contracts typically happen in three months? Six months? A pay/cost less per hour than short term year? In my experience, the vast jobs. In this case, the programmer trades majority of project estimates turn out to some income for security and a larger be wildly wrong, and almost all of overall payoff, and it’s usually a good them are optimistically so. trade for all concerned. I typically discount The only way around this is designing projects that take three months or more by the project in great detail before as much as 25%, all other factors being bidding it. Typically, I’ll design the equal. database and lay out all the DDF’s. I’ll You’ll notice that until now, I’ve complete screen layouts and report discussed hourly rates exclusively. I do “Project estimation is nearly a samples. I’ll write up the proposed flow this because I don’t think you can estimate black art in the programming of operations in clear, nontechnical or track a project in any other way — you business” terms. I include a total project bid, a have to consider the hours involved and list of milestones, and a payment price accordingly. However, hourly pay is not my favorite method schedule. This later says what completed work the client will be of remuneration although it’s certainly the most prevalent in the shown in exchange for a check of a designated amount. I try to industry. The reason it is the most common payment method is that time it so a milestone and its accompanying check show up fixed bid projects must be effectively estimated. And project about every week or two. You should seriously avoid letting estimation is nearly a black art in the programming business. milestones spread out over more than 30 days under any Folks who contract to build houses or lay asphalt, circumstances. armed to the teeth with experience and automated estimation In preparing one of these specifications, I think it’s programs, complain mightily about how tough project estimation wise to err on the side of extra detail. This sounds like a huge is, and how inadequate their resources are. They’re right — it’s amount of work, and it is. However, until you do this, there is tough — but it may be twenty times tougher for the contract absolutely no way you can effectively estimate what a job will programmer. At least, a company laying an asphalt road has cost. laid many roads before. It may go up or down, the bedding may While I may not know what it will cost to complete the be soft or hard, the climate may be cold or hot, but a road, after entire project, I can generally guess pretty closely how long this all else, is still a road. Programmers, on the other hand, are estimation phase will take. So I tell my client the truth: I can’t typically asked to perform tasks in completely unrelated fields. estimate the project cost until the specification phase is Looking over our books, I see my company handled over the complete. It will take me x number of days/weeks/months to course of one year a program to evaluate the density of biota in complete the estimate, and it will cost this amount. The amount an estuary, a shop floor control program that interfaced with varies depending on the project. Usually, charges run between robotics equipment, a project to track cost of production on $1,500 and $15,000 for a specification. Typical terms are 25% wood products, and the rescue of a database that a client had to 50% to start and the rest on submission of the specification. accidentally encrypted. And that’s in addition to ongoing work. You should anticipate changes in your first draft of All of these required different skill sets. specification, mostly due to misunderstandings, missing a small These are all good reasons why fixed bid work isn’t in but important point, etc. These, I correct for no extra charge. vogue today. However, I think the reasons in favor of fixed bid For major changes in the concept of the project, you should bill projects outweigh the dangers. It all comes back to trust. Hourly extra. billing tends to be a lot more protective of the contractor, and it A whole primer on project estimation is beyond the tends to put the client at a higher level of risk. I recall a project scope of this article. However, I’ll mention a few of the that progressed on schedule, with milestones being met and the concepts that represent the toughest hurdles I generally programmer getting paid every two weeks. But with each encounter when estimating a project, in hopes that they’ll help

27 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- even a little. WILL have bugs. Everyone must expect them and plan for them. I’ve never seen a large custom system written entirely Nothing happens that takes less than four hours bug free, and I doubt that such a thing is possible. Bugs are, unfortunately, part of system development. Test everything I In larger projects, this can go up to a day. If you think install as much as possible during the warranty period. If you that a simple report, for example, can be completed in one hour, don’t test then, finding a bug after the warranty is almost a more power to you. However, you should remember that a certainty. Bugs must be repeatable. If I can’t see the bug and single mistake means getting the error report, fixing it, make the bug happen, I can’t fix it. However, when non- recompiling (or the equivalent), sending the fixed version to the repeatable bugs occur during the warranty period, I log them. client, and getting the report that says the error is fixed. I can Later, if I find their cause, I almost never charge to fix them. barely write that sentence in under one hour. In a fixed bid Don’t commit valuable, unprotected data to a system until situation, it’s wise to build in some time for error control. you’re certain the system is stable. The real reason I put a time limit on this (and I tell my Add a percentage to the overall project cost to cover clients this too) is that I want to fix all of the errors while it’s still fresh in my mind. I can’t think of anything more mistakes. Tell your client about this too. disconcerting than having to fix a bug on a project I worked on five years ago in code the client is just now getting around to In a fixed bid situation, it’s difficult to go back for testing. So I’m not too inflexible about the exact timing on error more money once the project is underway. You absolutely have reporting. If the client finds a bug on the ninety-first day, I’ll to build in a buffer for when (not if) mistakes happen. From the consider it warranted, as long as the testing effort is underway. client’s point of view this is equally wise — major accidents can easily wipe out a project budget. Keep a safety buffer. What other items should a contract Work from previous projects. contain?

It’s a good idea to go back and reestimate previous First, I should say that I favor agreements versus projects, especially those that weren’t fixed bid. It gives you an formal contracts, even on larger jobs. Agreements can be just as idea of what reality is like and is sharpens your skills binding as formal contracts if they’re done right, and they seem considerably. to set a friendlier tone. I suppose that, if I took on a job with a client I didn’t trust, I might go with a formal contract, but I When a project estimate is high, consider that it might can’t see myself taking on such a project in the first place. also be accurate. In either case, contract or agreement, I’ll skip over the boilerplate that all these seem to contain — you’re better off This works with the last suggestion. A typical mistake I getting that from a lawyer or at least a preprinted form prepared still make is to look at a project estimate and get blown away by by lawyers, than you are from me. Instead, I’ll simply mention the huge numbers I come up with. Okay, sometimes they’re the points I think are most important: wrong. Other times, however, they turn out to be uncomfortably Include specific references to the specification as the close to reality. Look at some past projects that weren’t fixed project definition. The specification defines the scope of work bid. How much money and time really got spent in the long run? and the project. If the spec doesn’t say it, it won’t get done. You’ll note that a lot of this talk about planning can apply to Don’t try to describe the project in the agreement — it just hourly work as well as fixed bid projects. However, once I’ve doesn’t work. A specific reference to the Payment Schedule submitted a specification that states how long certain phases of a should be part of your specification. Payment terms. Mine are project will take, I find that I’ve inadvertently crossed over into due upon presentation of invoice. I try to include these in the the land of fixed bids without noticing. So it becomes the same agreement. Total payment amount. Likewise, I include this too. thing after all. I tend to avoid penalty clauses — I think they make for bad feelings. I don’t charge penalties for late payments, as that’s How should I handle any bugs I might almost never been a problem for me. I won’t accept a contract that includes a performance penalty or late penalty that effects find, in terms of a contract? me adversely. Either way, this gives the parties concerned a reason to find fault in each other. That’s not a healthy The client has a reasonable right to assume (and insure) relationship. Confidentiality. I note in any agreement that all I that their shiny new software works once it’s installed. have written is proprietary and confidential, and that release of Likewise, it’s also reasonable and fair for the programmer to this information will cost me sums far in excess of the project consider the project complete after a certain point, and not to be cost. That’s the truth too — how long does it take to develop a haunted by a project like Marley’s ghost. The best way I’ve file access routine that you use in all your work but don’t bill found to handle this is to issue a warranty that fixes any bugs for directly? I require that my client treat my information as that occur over a specified period of time, usually thirty to proprietary and confidential, and that they take measures to ninety days, for no extra charge. Bugs discovered after that time insure that it stays this way. Source Code. I specify who gets the period are billable. source code at the end of the project. Personally, I prefer that This may sound a bit harsh, but it’s not really — not if the clients have it — they seem to feel more comfortable when it’s done right. I tell my clients the following: The system 28 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- they don’t feel trapped into using me and me alone. loss. When the plaintiff made your confidential documents There’s much more that is typically included in such available to others, what damage did you incur? The fact that documents, but these are my favorite topics. Anyone seeking damage will result if your work is revealed should therefore be more information should contact a legal professional. included in the agreement. Another important thing to remember is that you can’t restrict a person from doing his or her job. I recall my lawyer Where do you find a “good” programmer, showing me an agreement that tried to exclude a programmer from working as a programmer after he left the firm, based on and how do you tell? the idea that all the techniques he learned were proprietary. Needless to say, this didn’t stand up. When writing a This question addresses a rather subtle problem: How nondisclosure agreement, I try to make sure that what I restrict to you test for expertise in a field where you have little or no is very specific and does not effect the contractee’s overall work expertise yourself? While I don’t know of a scientific answer to picture. this, there are a few things you can do. Get References — and One last thought on the matter: Nolo Press of Berkeley, call them. While any contractor in their right mind will only California produces a book called Software Development — a give references that speak well of them, you can still get lots of legal guide. It’s written by attorney Stephen Fishman, and it’s information about a contractor from anyone they have done really excellent. More important, it also contains sample business with before. Check source code. I often ask contracts, agreements, and nondisclosure contracts. Unless your programmers to bring me a sample of source code they’ve lawyer is s specialist in intellectual properties and the data written that they are happy with. Even if you don’t program, processing industry, this book may well tell you more than your you can tell a lot from this. Are there lots and lots of own lawyer can. The cost is offset by the sample contracts comments? Is the code neat looking? I know this last may sound alone.² silly, but try to lay out a large case statement without the proper indentations and see if you can understand it yourself! Ask the Jon Burke is an independent programmer, consultant, and programmer to explain why they are happy with this code. If the occasional free-lance industry journalist. Jon is president of programmer can explain clearly without reverting to Business Logic, 5 Vista Del Ponto, San Clemente, CA technospeak, that’s a real plus. Find out if you share any mutual 92672. He may be reached at: (714) 492-0442 CompuServe: contacts — and call them. Programming is a small world — it’s 75470,3115 Internet: [email protected] not unusual for me to find out that a prospective contractor knows some of the same people I do. If that’s the case, I call them up and ask their opinions.

What about confidentiality and nondisclosure?

Again, I’m not a lawyer and this is an especially tricky aspect of law. However, I’ll be glad to pass on what I’ve gleaned over the years. You’re advised to seek further council from professionals before acting on anything I say here. Excluding the cases where national security is an issue, violation of confidentiality and nondisclosure agreements are both served in civil court — no criminal penalties, at least as far as I’ve ever heard. If you’re trying to non-disclose a single programmer and they don’t have the financial wherewithal to make a law suit viable, and unless you can prove they actually profited directly from a disclosure of protected information, there isn’t too much you can do. The biggest damage one typically incurs from violating nondisclosure agreements is that he or she doesn’t get to see any more secrets and, as this industry is a close knit one, others hear of the violation and react with distrust. If, on the other hand, you’re concerned about confidentiality as it pertains to another firm, there is a lot you can do, starting with the typical nondisclosure agreement. These are often boilerplate, and you can get preprinted versions. Also, take a look at any of the larger company’s agreements that come out with beta tests, some product pre-announcements, etc. If you have access to one of these, taking an example from them can help. (Note: copying them may not be legal.) Like any other civil matter, judgment will depend upon

(800) 828-7438 or (615) 386-3100 FAX: (615) 386-3135 Vol. II, No. 4 October-December 1994 Btrieve Developer's Journal transactions are fulfilled immediately. Wholesalers have “order Small tweaks of the software to make operations more entry” or “customer order processing”, where documents called efficient can be done easily in the Windows environment. The picking tickets are prepared after the order is entered, and the ASVs let you add functions to menus to run your program from order is billed after it is determined what can be shipped. within the main software. Professionals use time and billing systems, and those in Many ASVs are marketing their own programming construction, job costing. Those in the computer industry need development environments for their packages. Whether it is quoting, service dispatch and time and billing. These modules Dexterity for Great Plains’ Dynamics or upcoming tools from will be covered in more detail in the next issue. Libra for their new Windows software, end users will be finding Development opportunities: Electronic data interchange that development is not as easy as they think. Mastery in one of integration; special query tools to help customer service quickly these environments may be a key to future business. find open and closed orders. Vertical applications Purchase Orders A number of developers have written applications to When it is time to replenish inventory, buy goods meet special needs that work in conjunction with off-the-shelf needed on jobs, or request outside services, companies user accounting. This means they do not have to take on as much Purchase Order (PO) systems to track the company’s responsibility, and can co-market their products with the ASVs. commitments. PO systems are used for printing and tracking open orders, keeping files on available and historic pricing, and User query tools entering receipts (and possibly the payable due upon receipt). Today’s accounting collects and keeps a great deal of Development opportunities: EDI integration; receiving information -just getting at it is a problem. The reports and systems; custom databases of pricing and history. inquiry screens of most accounting software are often criticized as containing too much. Developers can prepare tools for letting THE OPPORTUNITIES people get at their selected information more easily. Accounting Software is a lucrative environment for the Conclusion developer. Very few companies are 100% satisfied with the feature sets of off-the-shelf software. In fact, if you polled the Every major vendor of off-the-shelf high-end potential users of accounting software for their wants and needs accounting software has moved to Btrieve as the basis for their list, you would rarely find a package that met more than 80- next generation software. This is an exceptional time for the 85% of their “needs”. The developer can help in three ways. Btrieve developer to take a look at the marketplace, for their Modifications clients’ and their own sakes. ²

30 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386- Please let us hear from you! We want to make Btrieve Developer’s Journal just right for you. Send us any news, information, comments, suggestions, or anything else to Letters and Comments BDJ, 2416 Hillsboro Road, Suite 201, Nashville, TN 37212

Dear Btrieve Developer’s Journal, I have quite a few magazine subscriptions, but I can’t find the time to read any of them. I think yours may be the only one that I can get to on a semi-regular basis and I just have to read it from cover to cover. Of course, if I can free up that time, maybe I could have time to read the Table of Contents of my other magazines - just to see what I’m missing. Keep up the good work! Also, there seem to be quite a few people clamoring for ODBC improvements. I assume you’re keeping an eye open for the latest status on these projects. Davin Church, Mesquite, TX

Davin, Thanks for the kind words... We have been inundated recently with mail on ODBC. Ron Harris, President and CEO of BTI assures us that BTI is formulating a comprehensive ODBC strategy so that this problem will be solved. Here are some other comments that we have received recently: Dear Btrieve Developer’s Journal, The Intersolv ODBC driver is difficult to install, has quirks in usage, and is not even implemented correctly. For example, they maintain cursor support by issuing a WHERE statement containing the name and value of EVERY field in a table. If you have large records, the buffer overflows and you cannot access your data. BTI has great internal cursor support in Scalable SQL. Someone needs to implement a proper ODBC driver that takes full advantage of that product. Lance Prager, CIS: 71154,1341 Dear Btrieve Developer’s Journal, I would very much like to use Btrieve with an ODBC driver (using PowerSoft products) but the royalties are ridiculous. Intersolv/ Q+E wants somewhere around $60 per site and I need about 2,000 sites. BTI needs to write their own ODBC drivers. If anyone else is having any similar problems or worries, please let BTI know. Enough people could get the ball rolling. Michael Binette, Stoneham, MA

Dear Btrieve Developer’s Journal, We’ve been using both the Q+E and Microsoft ODBC drivers for Btrieve from within PowerBuilder for months... and we hate it. Both drivers have their problems, so a ‘true’ ODBC implementation from BTI would make us very, very happy. If beta testers are needed, we would be more than happy to volunteer. Rob Rene, Provo, UT

Dear Btrieve Developer’s Journal, As you know, I am working on a book about Btrieve for Addison-Wessley Publishers. Now that things are progressing, I have decided to look in to including a chapter on third-party tools that work with Btrieve and Scalable SQL, both commercial ones (like your DDF Builder for Windows and Smithware Controls for Btrieve) and shareware (such as Doug Reilly’s BTFiler). I would appreciate your passing this information along to any vendors who may wish to be included in this section. I’ll keep you posted on how things proceed. Jim Kyle, Oklahoma City, OK

Dear Btrieve Developer’s Journal, I just received my free copy of Btrieve Developer’s Journal today... and was it worth the wait. You guys sure did a good job on your magazine. Lots of good technical stuff. After reading the center section contributed by BTI, I now have a much better understanding of what Scalable SQL is about. I also liked the article on “Unlimited File Sizes” via a virtual filing system. I am sending in my subscription form tomorrow morning. Since we also purchased your Smithware Controls for Btrieve a few days ago, we are now searching the delivery people coming into and out of our building. It’s been at least two days now since we ordered them and we can’t wait! John Dunbar, Houston, TX

Dear Btrieve Developer’s Journal, Would you be interested in distributing the content of Btrieve Developer’s Journal electronically to your audience through Btrieve’s on-line service? Keven Pietzsch, Columbus, OH

Kevin, We are working with Chris Ojeda, BTI’s CompuServe SYSOP to set this up. Look for an electronic edition of all back issues of BDJ by the end of the year.

Dear Btrieve Developer’s Journal, It’s good to see some third party companies like Smithware tackling the information void in this industry. Product is only a small part of what developers want from a company. We want data, data, and more data. Keep up the good work. Robert Lauer, Newton, PA

31 Btrieve Developer's Journal Vol. II, No. 4 October-December 1994 (800) 828-7438 or (615) 386-3100 FAX: (615) 386-