Btrieve®

Winter 1995 Developer’s Journal Vol. III No. 4

THE INDEPENDENTSpecial Feature: SOURCE OF NEWS AND INFORMATION ABOUT BTRIEVE AND SCALABLE SQL

DevelopmentSurfing Tools in Roundup January: Hot Destinations for Developers on the Web BTI AND OTHER SOFTWARE VENDORS TURN TO THE INTERNET TO GET THE WORD OUT Appearance of these web pages, like the applications of Btrieve itself, ranges By Jim Kyle, News Editor Btrieve Technologies Inc. created a web from deceptively simple to extremely page, in addition to its support forum on complicated. A few sites, such as that of For the past several months, it’s been CompuServe. A number of other firms did BTI, provide magnificently detailed almost impossible to pick up any the same. When we began surveying the graphics. Unfortunately, the more publication (technical or otherwise) net to see how many Btrieve-related sites complex the graphic that finally appears, without finding at least one article dealing we could locate, most of the names best- the longer the time required to download with the “information superhighway.” It known to Btrieve users and developers the data so you can see it! Some of the appears that The Internet has surpassed popped out immediately. more striking pages, such as that from even “client/server” as the buzzword of The three dozen or so sites in the the Canadian consulting firm ThinkNet, the year! accompanying list almost certainly form show an awareness of this fact; they Well, we at the Journal are no only a sample of those in existence. We’ve combine relatively simple graphic exception to this rule. The World Wide contacted all of these at least once, so we elements with unusual type and layout Web really has lived up to its billing with know that the addresses were valid at the choices to create designs that show up regard to connecting the entire world time this article was written. Volatility of quickly yet carry great visual impact. desktop to desktop, and the Btrieve internet sites being what it is, however, we Several of the listed pages are “under community has joined the rush to can’t guarantee that all will still be valid construction” and may have incomplete establish its presence on the web. by the time you read this and try to reach information. In general, when this is the It all started innocently enough. them! See World Wide Web on page 10...

Btrieve is being talked about on the World Wide Web... See page 10 for our very own HTML page that accesses them all! Btrieve Developer’s Journal From the Cockpit... Winter 1995: Volume III, Issue 4 I’ve been thinking about my “From the Cockpit” Staff submission for this issue of BDJ for a little over a week now, and I think I’ve finally arrived at a great, natural topic. Since Publisher: Scott Smith it is the first day of 1996 as I write this, I thought it would be Editor: Steve Mook nice to write a note of appreciation to some of the people who News Editor: Jim Kyle have worked so hard over the past year to make this Product Analysis Editor: Jim Barber publication happen. Contributors: Doug Reilly, Jon Saunders Btrieve Developer’s Journal simply would not be Technical Corner: Linda Anderson, Doris Eldridge, Sharon Kimball, Diane Klinetob, possible if it were not for Steve Mook. Each and every Cathy Martin, Brett McAnally, Rudy quarter, my friend Steve reluctantly takes off his pointed hat McNeese, Chris Ojeda, Jose Pruneda, Jim that he wears as Smithware’s VP of Development and puts on Sneary, Laruie Wisbrun the BDJ editor’s dark gray felt hat with a yellow feather in it. Graphic Design: Arthur Austin I think he actually likes being editor because it gives him the Photographers: Dean Dixon, Empire Studio, opportunity to exercise a talent that he paid Vanderbilt Bruce Gallassero Dean Dixon Publisher, Scott Smith, not University so much money for (I always asked him just what Illustrator: Will Owen wearing the BDJ Flight Suit the hell he was going to do with an English degree, anyway). Circulation Manager: Cindi Gourley Administrative Assistants: Diane Kugel, His contributions to BDJ are always filled with interesting Keli Jackson facts on Btrieve development peppered with funny comments, anecdotes, and wax. I’m am Inspiration: Cessna Cardinal consistently amused, surprised, and extremely pleased with what Steve generates for the pages of BDJ. He also corrects everything that I right. Subscriptions I am especially pleased with the contributions of Btrieve Technologies for the Technical Corner section of BDJ. In fact, Laurie Wisbrun at BTI has made this section of BDJ not only Annual subscriptions are for four issues per one of the most important, but also has made its production one of the easiest for us to year at $49/year for delivery inside the complete. She and Cathy Martin also do a great job of keeping us at BDJ informed about United States and Canada, and $79/year for delivery outside the United States. what’s newsworthy at BTI. Back Issues: Back issues are available for I am always grateful that Doug Reilly continues to provide us with his on-going series of $20.00 per issue. Contact Cindi Gourley at interesting “Inside Btrieve” articles. It is also so much better to have Jim Kyle taking care of (615) 386-3100 for additional information. turning the mounds of Btrieve-related press releases, tips, and rumors that we receive into meaningful news. It’s also great to have Jim Barber taking care of our product analysis Advertising section. For information about advertising your product There are many people who are or service in Btrieve Developer's Journal, call responsible for getting BDJ out to you, and I Carolyn Lighty, Advertising Manager, at (800) don’t have room to thank them all. But I do 685-2403 or (201) 712-0044. appreciate all of the work that comes from so How to Contact BDJ many sources, and I am looking forward to a very productive, and surprising 1996! Btrieve Developer's Journal 2416 Hillsboro Road, Suite 201 Nashville, Tennessee 37212 Telephone: (615) 386-3100 Contents... Facsimile: (615) 386-3135 CompuServe: 73173,2731 Hot Destinations for Inside the Windows NT/ Email: [email protected] Btrieve Box Internet: http://www.smithware.com Developers on the Web The World Wide Web has lived up to its Doug Reilley opens the box and lets Btrieve Developer’s Jounral (ISSN 1071-7463) is published 32-bit Btrieve development run free. quarterly by Smithware, Inc. 2416 Hillsboro Rd., Ste. 201, billing with regard to connecting the entire Nashville, TN, 37212-5318. Subscriptions are $49 per year for Find out if the newest developers kit delivery in the US and Canada, $79 per year for international world desktop to desktop, and the Btrieve subscriptions. Application to mail at Second-Class rates is community has joined the rush to establish from BTI is right for you...... 21 pending at Nashville, TN. its presence on the web...... 1 Postmaster Special Feature: Product Analysis Send address changes to: Btrieve Developer’s Journal, 2416 Hillsboro Rd., Ste. 201, Nashville, TN, 37212- 2 DOS-Based products help make sense Btrieve Development 5318 out of Btrieve data: BTViewer and BTedit- Tools Roundup Copyright 1995 by Smithware, Inc. All rights reserved. Plus...... 6 With the exception of the “Technical Corner” section, this publication is produced independently of Btrieve “The one thing that these products have Technologies, Inc. in common (and in some cases the only No part of this publication may be reproduced in any form by The BTI Technical Corner any means without permission in writing from the publisher. thing they have in common) is that each Smithware is a trademark of Smithware, Inc. Find out what’s new in the world of Btrieve is designed to make the task of writing a Btrieve and XQL are registered trademarks and Scalable SQL, and Scalable SQL development from the Xtrieve Plus, and Microkernel Engine are Btrieve database application easier and trademarks of Btrieve Technologies, Inc.All other names are brightest minds at BTI...... 13 more efficient.”...... 24 the trademark of their respective manufacturers.

Winter 1995 Btrieve Developer's Journal 2 upcoming OS/2 Warp Server product,” IBM AND BTI PARTNER TO PORT said Art Olbert, vice president of LAN, IBM Corp. “We believe this will be a major catalyst in broadening the appeal of BTRIEVE TO OS/2 WARP SERVER OS/2 Warp Server from our historical Companies to participate in activities including joint product large account strength to small and medium-sized businesses.” development and marketing, channel development, and “This agreement demonstrates our customer service programs commitment to support the industry- leading server platforms,” said Ron Austin, Texas — IBM Corporation and include technical collaboration and Harris, BTI president and CEO. “Through Btrieve Technologies, Inc. have formed a assistance on the port of Btrieve to OS/2 the partnership, our installed base of over strategic agreement to deliver a client/ Warp Server, joint sponsorship of reseller 50,000 developers will be able to incorpo- server solution that will combine Btrieve authorization seminars, training and rate OS/2 Warp Server into their client/ database and OS/2 Warp Server technol- education activities, and cooperative server solutions for midsize businesses ogy. IBM and BTI will work together to technical support services. and corporate workgroups,” said Harris. deliver a solution that enables customers The partnership exemplifies IBM’s OS/2 Warp Server is IBM’s business to add OS/2 Warp Server to their existing commitment to broaden client/server server solution for customers ranging from network and immediately run Btrieve- solutions to its customer base and expand small businesses to departmental work- based applications in a client/server its presence in small and medium-sized groups to large enterprises. It provides an configuration without changing a line of businesses, and further underscores BTI’s integrated package for the growing code. commitment to provide its vast commer- application server environment, as well as Under the terms of the agreement, cial developer channel access to the a complete set of file and print services by IBM and BTI will participate in a wide industry leading network operating combining OS/2 Warp and LAN Server array of activities including joint product systems. 4.0 with sophisticated system manage- development and marketing, channel “This partnership will provide instant ment, backup and recovery, remote development and customer service compatibility between thousands of access, advanced printer functionality and programs. Initial details of the programs Btrieve-based applications and our Internet network access. ²

Btrieve Save Developer’s Journal 2416 Hillsboro Road, Suite 201 $30 Nashville, Tennessee 37212 Phone: 615.386.3100 Fax: 615.386.3135 Please send me a one-year, four-issue subscription to Btrieve Developer's Joural Start Your Subscription or Renew Today ($49 for delivery within the US & Canada, $79 elsewhere). I am: and Get Special Subscriber Discounts! 0 A new subscriber 0 Renewing my subscription for an another year (4 more issues) Take advantage of special subscriber discounts on Btrieve 0 Please send me Btrieve Complete for only $24.95 Complete and The Illustrated Guide to NetWare Btrieve. 0 Please send me The Illustrated Guide to NetWare Btrieve for only $24.95 These two great reference books should be part of every Btrieve and Scalable SQL developer's library. They contain Name a wealth of up-to-date information, including tips for Address understanding, configuring, and programming the Btrieve record manager. For a limited time, you can save up to $30 when you begin or renew your subscription to Btrieve Developer's Journal. Both books retail for $39.95, but, with your paid subscription to BDJ, get either book for $24.95, Please charge my: 0 Visa 0 MasterCard 0 American Express a $15 savings off the cover price. Buy both, and save $30! Card # Expires Offer good only in conjunction with new subscriptions and renewals. Book will be Signature shipped when payment is received. Limit one copy of each book per subscriber.

3 Btrieve Developer's Journal Winter 1995 several fine ones are normally advertised in each issue of BDJ.

Operation BTVIEWER uses the familiar drop-down menu interface. All the editing keys were where I expected them to be, and the was consistent. In my opinion, BTVIEWER’s most outstanding feature is its file browsing capability. To browse a file, you simply select the file from a drop-down list, and press ENTER. You’ll be rewarded with a nice view of your data, in a record list format. by Jim Barber Bringing up an editable view of the record is easy; [email protected] you just highlight the desired record and press ENTER. A menu will pop up, allowing you to edit the record either Btrieve data could be described as “a streams of bits, as raw hexadecimal data or as field values assuming you waiting for a program to expose their information.” have DDFs, delete it, copy it, or add a completely new Regardless of how you describe it, the fact remains that record if you wish. In addition to its straight browsing Btrieve data must be “tamed” before you or I can make capabilities, BTVIEWER provides fairly extensive record any sense out of it! Having set the theme for the column, filtering, allowing you to specify things like “=03”, or let’s take a look at two DOS-based products that will help “>MONTE” on a field-by-field basis. It is not a full- turn those bits into data. blown SQL parser, but this approach worked pretty well with our data. You can also save often-used views of your files to BTViewer disk, which can save you both time and typing, if the view is fairly sophisticated. BTVIEWER can also be configured BTVIEWER is a shareware Btrieve file utility that to use Btrieve extended operations for filtered or restricted will perform quite a number of functions on Btrieve files, views of the file. This capability speeds using these views including cloning, packing, copying, and browsing. It can a great deal! Another feature I like about this program is also attempt to recover data from damaged files. the “Print Layout” option. This will print a report of the Installation structure of your file and keys as defined by the DDF file. I found this feature useful because, although we keep Installing BTVIEWER is straightforward: Simply formal layouts on file, it is very handy to be able to print unzip the archive file into whatever directory you choose a work copy of the layout, which I can then scribble on to to put it in. The only additional step is to add a DOS my heart’s content. environment variable, BTFILEPATH, to tell the program the location of your DDF files. You can do this with the Jim Says... DOS Set command. Since I mentioned DDF-building tools This program has a lot of features, far too many to in my last column, I’ll just say that you need one, and that cover in the space we have here. Some of the highlights include file import/export, user-defined sorts, global modifications, and lists of both Btrieve error and op codes, which make a good quick reference for those of us with less-than-perfect memories. Not that I would admit to being less than perfect. The only potential drawback I can find to this product is that it appears to run in DOS only. I didn’t spend a great deal of time trying to get it to run under Windows, and it is at least possible that it will, with the right tweaks. BTVIEWER is a solid, well-implemented Btrieve utility package that runs under DOS. It is available on the Btrieve Technologies CompuServe (GO BTRIEVE) forum BTViewer, available in the BTRIEVE forum on CompuServe, is a in library 10 as a shareware package, and is well worth its solid, well-implemented Btrieve utility package that runs under DOS modest $79 price tag.²

4 Btrieve Developer's Journal Winter 1995 for me, well, the jury’s hung, and I can’t find my gavel. BTedit-Plus Let’s move on. One of this programs shiniest features is its very The Btrieve utilities market is probably one of the flexible global operations set. Global changes can be made least developed segments of the industry, and one with a within a column defined by the DDF file. Searches can be very high potential for growth. In the search for the big within a marked set of records, or across the whole file. markets, we sometimes overlook the possibilities of the Up to sixteen thousand records can be marked individually smaller ones. When I chatted with the folks at C-Soft or by pages. Once records are marked, searches are about their products, I was pleased to find a company that restricted to the marked set. Global searches should not be was positive about what they were doing, and was looking confused with key (indexed) searches. BTedit-Plus does at industry changes as opportunity, rather than obstacle. both, but global searches are not restricted to key fields, Having said my bit on that topic, let’s get to the business and can be specified as either case-sensitive or not, by at hand. preference. BTedit-Plus is a DOS-based Btrieve file editor and Jim Says browser that performs the additional functions of rebuilding Btrieve files, cloning files, adding and There is one thing that I particularly like about dropping indexes, and global search-and-replace BTedit-Plus. You can switch views of the file from fielded functions, which we’re going to talk about in more detail (as defined in the DDF) to whole-record and back by as we go. pressing F6. This logic extends to the editing mode, allowing you to edit data by fields, or by a hex/ascii view Installation of the record, depending on which way you toggled the Installing BTedit-Plus is a breeze. After copying it to F6 key. If you’ve ever had to deal with a Btrieve file that the directory of choice, simply type the name of the self- has variable record types, you will appreciate this feature. extracting archive file at the command prompt. After the BTedit-Plus ran just fine in a “DOS-box” under Windows program installs, press “F2” at the main menu to display 95, at least on the two machines I tried it on. the “Defaults Settings” screen. This is where you can I had no trouble accessing Btrieve files on our specify the location of your DDF files, if any, and set NetWare 3.12 server, (NLM version 6.10c) although I other program options. was not able to access files on our production server running Windows NT. To be fair, though, I have yet to Operation find a DOS-based Btrieve utility program that will talk to an NT server. I believe it is more a problem with Running BTedit-Plus takes a bit of study. It is not a BREQNT than the utilities themselves. menu-driven program for the most part, relying instead on BTedit-Plus is a fast, efficient Btrieve editor/browser control-key combinations for most operations. My with very capable global search and change capabilities. I impression is that the user interface was designed for would recommend it for “heads down”, intensive file- efficiency, rather than convenience. First-time or thrashing sessions. infrequent users will have to look things up, while BTedit-Plus is available from C-Soft, Inc. in Lilburn, experienced operators will appreciate the minimum Georgia, phone 770-279-9493 or email 75037.1605@ number of keystrokes required to perform a function. As compuserve.com.²

Helps us Help You! We are constantly searching for products and services of interest to the Btrieve community. If you are aware of any Btrieve-related product that you recommend we present to our readership, please let us know about it. Please send information to: Btrieve Developer’s Journal Phone: 615.386.3100 Product Analysis FAX: 615.386.3135 2416 Hillsboro Road, Suite 201 Email: [email protected] BTedit-Plus, from C-Soft, is a fast, efficient Btrieve editor/browser Nashville, TN 37212 http://www.smithware.com with very capable global search and change capabilities

Winter 1995 Btrieve Developer's Journal 5 Great Plains Software and Btrieve Technologies Join McAfee Dropping Btrieve Forces to Integrate Accounting and Database Products Santa Clara, California — With the release of SiteMeter 5.1 in early Fargo, North Dakota — Great Plains DOS systems, was recently a PC Maga- December, 1955, McAfee Associates, Inc. Software and Btrieve Technologies, Inc. zine Editors’ Choice. Great Plains fulfilled the first step of a commitment to have reached an agreement to integrate Dynamics C/S+, a Windows NT three-tier offer network administrators a scaleable Btrieve database engines more tightly with client/server solution for businesses database for collection of asset Great Plains’ 32-bit suites of Windows downsizing from minicomputers or management information. They did so by client/server financial applications. converting from LAN systems to client/ replacing the Btrieve database used in Great Plains will provide a the source server configurations, offers a multiple- previous versions with an xBase format. The primary reason for moving away for all of the software needed to imple- database architecture. Btrieve for Win- from Btrieve, according to a McAfee ment their Dynamics or Dynamics C/S+ dows NT is the recommended choice. spokesman, was to avoid the necessity for financial applications, running either on Both Dynamics and Dynamics C/S+ loading TSR’s such as the Btrieve Btrieve for NetWare or on Btrieve for support all desktop requester onto client PCs. The spokesman Windows NT, starting in the first quarter environments, as well as Macintosh and cited a number of complaints from of 1996. Power Macintosh clients. Microsoft Brightworks customers about this “Great Plains Software has been Windows NT can be run both as a client requirement, and confirmed that all developing accounting applications based and as a server on either product. In McAfee products would be moving away on Btrieve Technologies longer than any addition, Dynamics supports NetWare as a from the use of Btrieve. Many system administrators feel that other vendor,” said Ray August, chief server platform, while Dynamics C/S+ the xBase format, used by such technology officer at Great Plains Soft- offers UNIX server support. as dBase and FoxPro, enables simplified ware. “Tightly integrating and delivering Great Plains Software develops, data manageability and ease of installation. the latest releases of Btrieve for Windows markets, and supports accounting and The next update to SiteMeter will expand NT and Btrieve for NetWare with the financial-management software world- open database support with support for Dynamics Product Family is a natural wide. The company offers solutions that Oracle’s enterprise SQL format. XBase extension of our long standing relation- range from midrange client/server systems and SQL support are expected to provide ship,” he continued. to small business integrated accounting increased flexibility in how McAfee Great Plains Dynamics, an accounting software. Great Plains, founded in 1981, is customers centrally collect, consolidate and analyze metering information. solution for small to medium businesses privately owned. ² Founded in 1989, McAfee is a major migrating to Windows from traditional vendor of Security and Network Management products for the PC market. McAfee is headquartered in Santa Clara, California and can be reached by phone at Updated Smithware Tools Ship (408) 988-3832 or by fax at (408) 970- New 32-bit Smithware OCX Controls for Btrieve Announced for Early 1996 9727.

Nashville, Tennessee — Smithware, According to Steve Mook, Summit National Changes Inc. is now shipping version 2.5 of Smithware’s Vice President of Strategy Smithware VBX Controls for Btrieve. Development, “In addition to these new Chicago, Illinois – A strategy change on The product has long been used by features, major enhancements were made the part of Summit National Group with Visual Basic developers to easily create to the VBXs that will allow quick regard to the marketing of its Btrieve Windows applications that are built on migration to OCX format.” Smithware’s Components for Delphi gave rise to an unfounded rumor that the product line was Btrieve. OCX Controls are scheduled to begin Smithware VBX Controls for being discontinued. beta test in late February of 1996. Actually, explained Summit National Btrieve 2.5 works with 16-bit Visual “We recognize the importance of spokesman Aaron Symanski, all that was Basic version 3 and 4, and will also load moving our tools quickly to 32-bit, but discontinued was the existing advertising with Visual C++ 1.x and other 16 bit we also continue to see a high demand for campaign. Future marketing strategy development environments that support our 16-bit versions due to the slow revolves around exposure on Summit VBXs. corporate migration to Windows 95. We National’s Internet Web page, and word of This new version includes a new will continue to support the 16-bit mouth recommendations from existing control encapsulates Btrieve’s extended community as long as our customers users. Far from dropping the line, Symanski operations for record retrieval. The new demand it,” said Scott Smith, Smithware Extended Operations Control can be went on to say, Summit National has President. begun providing full source code to the used to link the controls to commercially Smithware VBX Controls for Btrieve components as part of the package at no available grid controls with very little ships with the upgraded DDF Builder extra cost, and has supplied copies of the code. Additionally, the list box and version 2.50. The product's suggested source code to all previous purchasers. combo box now can automatically fill retail price is $249.95. Upgrades from Summit National Group can be reached at with records from a file. New methods previous versions are $129.95. ² (800) 621-9531, by fax at (312) 944-8346, and data types have also been added. or via E-mail at 73420,3727@compu serve.com. 6 Btrieve Developer's Journal Winter 1995 evaluated currently shipping products BTI-Based Systems Dominate (general ledger, accounts payable, and Macola Software, BTI Offer PC Magazine Awards accounts receivable modules only) from Complete Client/Server Austin, Texas — The winners of PC vendors with a strong market presence. Solution Magazine’s 1995 Editor’s Choice Awards “We are proud to receive PC Maga- Marion, Ohio — Macola Software, Inc., for accounting software are built on BTI’s zines Editor’s Choice Award for Solomon and Btrieve Technologies, Inc. have agreed database technology, Btrieve Technologies IV, and recognize the power of BTI’s to ship shrink-wrapped client/server Inc. has announced. First Place winners Scalable SQL database provides,” said Skip solutions that combine Scalable SQL or were Great Plains’ Dynamics, built on Reardon, marketing manager for Solomon Btrieve client/server database engines with Btrieve 6.15, and Solomon’s Solomon IV, Software. “Scalable SQL allows us the Macola’s Progression and Horizon Series built on Scalable SQL. Macola’s shrink-wrap an effective client/server accounting, distribution and manufacturing WindowsPlus, built on Btrieve 6.15, solution that reduces network traffic by business management software. The received an honorable mention. Six of the pushing more of the database processing agreement authorizes Macola to manufac- eight contenders in the competition were onto the server, and eliminates administra- ture and distribute three BTI products: based on BTI’s database technology. tion with ‘set it and forget it’ operations.” Scalable SQL for NetWare (Server Edi- “This important recognition reinforces “We design our accounting solutions tion), Btrieve for NetWare (Server Edition), the quality of our client/server database to take advantage of the most powerful and Btrieve for Windows NT (Server technology which is designed specifically client/server technologies,” said Ray Edition). Macola’s Technical Support for commercial developers,” said Ron August, chief technology officer at Great Group will provide technical support, and Harris, president and CEO of BTI. “By Plains Software. “By building Dynamics on Macola will deliver BTI product updates combining advanced technology and value BTI’s Btrieve 6.15 database we are able to automatically to its customers. pricing, BTI is opening broad new markets deliver the power, flexibility and ease of “This agreement offers Macola’s for shrink-wrapped client/server solutions.” use that our customers require.” customers an `out-of-the-box’ client/server The PC Magazine Editor’s Choice “Btrieve is a winning part of our solution,” said Ron Harris, president and Awards recognize Windows accounting growth strategy,” said David J. Shirk, vice CEO of BTI. “By combining our engines products that provide outstanding account- president of Sales and Marketing, at and Macola’s business management ing functionality, while offering ease of use Macola. “Now we are able to deliver software in one product, we provide and integration and customization features. advanced client/server solutions to hun- improved performance, scalability and PC Magazine, in collaboration with a team dreds of new customers every month.” maintenance free operations.” of accounting experts at Price Waterhouse, ² Macola’s product offering includes the Progression Series of scaleable accounting Smithware Announces Vertical Application and distribution software and the Horizon Series of manufacturing modules. The Partner Program for Crystal Reports Progression Series addresses the accounting Nashville, Tennessee — Smithware, Inc. The VAP program is especially and distribution needs of companies has launched a program designed for designed to address the needs of small to ranging in revenue from $1 to $50 million. custom software developers, resellers, and mid-range companies. According to John The Horizon Series offers a suite of in-house users of Btrieve-based applica- Scudder, Smithware’s Sales and Marketing manufacturing modules, and focuses on tions. The Vertical Application Partner Manager, “Our VAP Program is designed manufacturers with revenues from $5 to Program, or VAP Program, is targeted to for high flexibility. We have gone to great $50 million who operate in repetitive, developers who wish to integrate Smith- lengths to accommodate the needs of discrete, job shop, light planning, control ware Crystal Reports for Btrieve into their developers and resellers of any size, in any and enterprise manufacturing environ- particular application or environment. market. This is one way that we are ments. Smithware has established the VAP aggressively pursuing the incredible Macola Software specializes in high- program in order to make Smithware potential that exists in the form of de- end accounting, distribution and manufac- Crystal Reports for Btrieve readily ployed Btrieve applications.” turing software for personal computers and available to the wide range of vertical Smithware claims that the VAP LAN environments. The company has a market applications that are built on program is unique because of it’s simplic- presence in 53 countries, and is a four-time Btrieve and Scalable SQL. The program ity and accessibility. “Other programs of winner of the PC Magazine/Price will allow developers and resellers to this type routinely include performance Waterhouse “Editor’s Choice” award and a include a complete, powerful, full-featured quotas, prohibitively high setup or initia- 1995 winner of an Honorable Mention. Btrieve database reporting tool with each tion fees, and unwieldy legal agreements. Most recently, Macola’s MRP II software installation of their product. Smithware has greatly simplified our received a “Readers Choice” award from Although the initial emphasis of the approach to encourage participation at all Manufacturing Systems. Macola is also a VAP program is on Smithware Crystal levels of business,” Scudder said. recipient of a four-star rating from Soft- Reports for Btrieve, the program also The VAP Program will be officially ware Digest/NSTL Publications and a two- applies to the entire line of Smithware announced at the Btrieve Developer’s time winner of LAN Magazine’s Product of products including Smithware Controls for Conference in mid-January in Austin, the Year Award.² Btrieve and DDF Builder. Texas.²

Winter 1995 Btrieve Developer's Journal 7 case the page author usually includes a or complex, had items of interest, and reasonable prices, and several of the prominent warning notice to keep viewers most offer links that let you contact the boxed solutions include coupons offering from being misled. We found only one page’s owner directly. Several offer free discounts on Internet services. The web page that was incomplete but had no evaluation copies of products. Some of nationwide networks such as America warning; it probably will have a warning, these products are tools for Btrieve Online or CompuServe now provide or will be fixed, by the time you can view developers while others are applications Internet connections but smaller local or it, because we notified the author that use Btrieve. regional service providers usually have immediately. The best way to see what’s out there lower rates. We found a few pages rather difficult is simply to get onto the net yourself, and When you get on the net, stop by any to read because of inappropriate color start browsing. Egghead, Best Buy, or all of the BDJ-related pages and say choices; none, however, was completely Office Depot, and similar software outlets hi! See you on line!² illegible. All of the pages, whether simple carry a wide range of Internet software at Ready-Made HTML: type the following lines into a text file, name it BTSITES.HTM, access it with your web browser, and enjoy the sights

Btrieve-Related Web Pages

The Main Players

Btrieve Technologies Inc. (slowed by large graphics)
Btrieve Developer’s Journal (free issue request)
Artisoft (Lantastic)
Southdown House (U.K. distributor)
Novell (NetWare)

Toolmakers, Small and Large

Doug Reilly, Access Microsystems (and BDJ columnist)
Amisys (Distributor of Titan)
Peter Blair (Author of Titan)
Andre Larmet, C-Soft products
Communications Horizons
Crystal Reports
DataAccess
Dataflex
FlexQuarters (Brad Waddell’s Flextrieve)
Information Architects
Intersolv
Smithware
Summit National (under construction)

Commercial Developers

Campbell Services
Cognos
Comshare
Great Plains
IQ Software
Magic
Maximizer
Peachtree
Primavera Systems
Solomon Software

Consulting Firms

JYACC
Strategic Mapping
ThinkNet

Other Related Vendors

AcuCobol
Borland
Cheyenne Software
Liant (RM Cobol)
MicroFocus
Software 4 Retail Solutions (not yet completed)
Tools and Techniques (Data Junction - good)
VBXtras (excellent)

Miscellaneous Related Pages

InContext Corp
Jim Kyle, BDJ news editor

8 Btrieve Developer's Journal Winter 1995 BTRIEVE TECHNOLOGIES TECHNICAL CORNER

WINTER 1995 SUPPLEMENT TO B TRIEVE DEVELOPER'S JOURNAL

Q&A - 32 BIT BTRIEVE DEVELOPER KIT FOR WINDOWS 95/WINDOWS NT

What is unique about the Windows Function Executer, Btrieve Roll Forward), the 32- utilities (Btrieve File Manager, Btrieve Function NT/Windows 95 Engine? bit command line Butil utility, Language Executer, Btrieve Roll Forward), a 32-bit Btrieve for Windows 95/Windows NT is a interfaces and import libraries for Microsoft, command line Butil utility, and a 32-bit Setup full 32-bit application interface. It includes support WATCOM, and Borland C, 16 and 32 bit support utility that modifies the Windows 32-bit program for both 32-bit and 16-bit Btrieve applications. A for Microsof Visual Basic 4.0, 16-bit support for registry. single engine supports both Windows NT and Visual Basic 3.0, and a language interface to the Windows 95. Btrieve for Windows NT/ 16-bit Borland Pascal Compiler. The kit includes How do I obtain the Windows NT/ Windows 95 supports multi-tasking and registry. Sample programs in C, Pascal, and Visual Basic, Windows 95 Requester? and a 32-bit Setup utility that modifies the The same 32-bit interface and requester What is included in the Windows NT/ Windows 32-bit program registry. (WBTRV32.DLL and W32BTICM.DLL) is used Windows 95 Developer Kit? on Windows NT and Windows 95 The Btrieve for Windows NT/Windows 95 What is included in the Windows NT/ to communicate with Btrieve server engines Developer Kit contains the Btrieve Windows 95 Engine? (Windows NT and NetWare). These Programmer’s Manual, the Btrieve for Windows The Btrieve for Windows NT/Windows 95 components, the 32-bit interface and requester, NT/Windows 95 Installation and Operation Workstation Engine contains the Btrieve for are referred to as the Btrieve for Windows NT/ manual, the Btrieve for Windows NT/Windows Windows NT/Windows 95 Installation and Windows 95 Requester and are available free of 95 Work-station Engine (developer version), the Operation manual, the Btrieve for Windows NT/ charge to customers whom have purchased a 16-bit utilities (Btrieve File Manager, Btrieve Windows 95 Workstation Engine, the 16-bit Continued on next page...

LICENSING OPTIONS FOR B TRIEVE T ECHNOLOGIES PRODUCTS

Btrieve Technologies, Inc. (BTI) recently The Commercial Deployment Kits for ORKSTATION NGINES introduced a new licensing model called the Scalable SQL and ODBC Interface allow W E Commercial Deployment Kit. This volume developers to distribute up to 1000 seats of licensing option is now available for Scalable Scalable SQL or the ODBC Interface with their Seat Commercial Unlimited SQL and BTI’s new ODBC Interface. The application for $1,995 (less than $2 per seat). For License Development Distribution Commercial Deployment Kit was introduced to example, the sale of a 20-user version of your Kit License provide commercial developers with a low cost application would count as 20 seats. BTI Scalable mechanism for bundling full relational database introduced this pricing model at the request of SQL technology with their applications. developers wishing to distribute application into the workgroup market, but did not have the ODBC The Commercial Deployment Kit is an Interface addition to the existing licensing models that BTI quantities to enter into the Manufacturing Partner has had in place. To date, developers of Scalable Program. Thus, BTI is offering a new economic Btrieve SQL and/or ODBC have had two options for model for commercial developers by providing a bundling database technology with their Manufacturing option in a box. applications. One is the Manufacturing Partner In addition to the Commercial Deployment CLIENT/SERVER E NGINES Program (MPP), targeted at developers that are Kit used with Scalable SQL and ODBC Interface, distributing high volumes of their application. BTI continues to offer the unlimited distribution This program involves an annual volume option for the redistribution of the Btrieve Manufacturing Price List Partner Program commitment with related discounts based on workstation engine. volume. The other is the Workstation Engine With the introduction of the Commercial Scalable Single Seat license option, targeted at developers Deployment Kit for Scalable SQL and ODBC, SQL that are distributing low volumes of their BTI continues to drive the distribution of client/ application. This option would allow the server database technology as part of shrink wrap ODBC Interface developer to ship a single seat workstation and mobile applications with innovative engine with each copy of their application. The licensing models for the developer. Btrieve developer purchases the product from the published price list.

Winter 1995 Btrieve Developer's Journal 9 instances of the same application in the same default setting for both the local and requester Q&A CONTINUED... Virtual DOS Machine (VDM) on both Windows access is Yes. If you are accessing files that reside NT and Windows 95. You still have the option on your local drive and you have local access set Btrieve v6.15 Server for Netware or Windows on Windows NT to run the applications in to yes, requests go through the local Btrieve NT. You can obtain them by contacting separate WOW boxes. 16-bit applications Workstation Engine. If you have requester access Btrieve Technologies’ Technical Support running in the same VDM on Windows NT or set to yes, and if you are accessing files that group at 512-794-1719 or 800-287-4383. You Windows 95 behave as if they are running on reside on a remote file server and that file server must provide proof of purchase or your Windows v3.x with respect to multi-tasking. The has a Btrieve Server Engine running on it, the product serial number. The 32-bit requesters does not apply pre-emptive requests go through the requester to the server will soon be included in all new purchases of scheduling among processes within a VDM, engine. the Btrieve Server packages. only among different VDMs and Win32 For remote access, you must verify that the applications. On the other hand, every WOW communication module, W32BTICM.DLL, is in How do I configure Btrieve for box that you start on Windows NT requires your path. Windows NT/Windows 95? about 2MB of additional virtual memory. To access Btrieve for NetWare from a You can configure this engine using the Windows 95 workstation, you must also have Setup utility that is included with the product. Do I have to change my 16-bit Windows W32NR.DLL and W16NR.DLL. These This utility writes to the registry (REGEDIT.EXE application to use the new 32-bit components are included with the 32-bit on Windows 95 and REGEDT32.EXE on Btrieve? requester update. A new BSPXCOM.NLM has Windows NT). When installing Btrieve, the No. The underlying architecture is been released with the Windows NT/Windows Installation utility creates default entries for transparent to the application. Once you set 95 requesters. Replace the BSPXCOM.NLM that Btrieve in the registry. You can use the Setup thunk=Yes in your BTI.INI file, your application is shipped with Btrieve for NetWare v6.15 with utility to configure the engine for your should run correctly. Your application still calls this component. There is a new command line particular environment. the 16-bit Btrieve for Windows interface DLL setting that you must also configure to handle a (WBTRCALL.DLL). Since thunk=Yes in your If you purchased the Btrieve for larger receive buffer that the 32-bit requesters Windows NT/Windows 95 v6.15 Unlimited BTI.INI file, this DLL references require. This NLM will soon be included with Distribution license and are installing the WBTRTHNK.DLL which calls the 32-bit DLL new purchases of the server engine. interface WBTRV32.DLL. engine with your application, on start up, the For 16-bit applications, set thunk=Yes in engine adds the necessary entries to the The Windows NT/Windows 95 your BTI.INI file and include WBTRCALL.DLL, registry if the entry has not previously been Workstation Engine does not support callback WBTRVRES.DLL, and WBTRTHNK.DLL in your created. You can use the Setup to execute this functions. An application can call the API to search path. function. Once you have loaded this utility, it register a callback function, but it is not called by loads the MicroKernel Database Engine, and Btrieve. What is the best way to utilize threads to thus, the default entries are created in the retrieve and maintain my Btrieve data? registry. How can I access the Windows NT/ The Btrieve for Windows NT/Windows 95 Windows 95 Workstation Engine from Workstation Engine supports multiple threads in Do I need a BTI.INI File? applications written for DOS? the same application in that it allows parallel The BTI.INI file is only required if you are You cannot access the Windows NT/ processing of Btrieve requests. When a thread running a 16-bit Windows application on Windows 95 Workstation Engine from DOS. makes a Btrieve call, it is blocked until the Windows 95 or Windows NT using the However, if you have the Btrieve for NetWare request is processed and the data is returned. To Btrieve for Windows NT/Windows 95 Engine or Btrieve for Windows NT Server edition, you achieve the best performance, the application or Requester. You must set the thunk option to can access remote servers through the developer must be aware of a the following yes in the Btrieve section of your BTI.INI file, BREQUEST or BREQNT Requesters. product design issues: as follows: The interface DLL and the Btrieve engine [Btrieve] What is the difference between are not re-entrant at the client level, so whenever thunk=yes BREQUEST and BREQNT? the DLL or the engine is active on behalf of a BREQUEST is the DOS Requester you can This is the only setting in BTI.INI that client, any other thread with the same client ID is use to access Btrieve servers running on WBTRCALL.DLL uses. BTI.INI must be blocked until the request is processed and the NetWare servers only. BREQNT is also a DOS located in your Windows directory for data is returned. For example, when you call Requester and is functionally equivalent with Windows 95 users and in your WINNT35 BTRV or BTRCALL, the interface DLL creates a BREQUEST; however, it is capable of accessing directory for Windows NT users. client ID for the caller based on the process ID of Btrieve servers on both NetWare and Windows the caller. If an application makes BTRV or Is an ODBC interface for Windows 95 NT servers. BREQNT allocates more BTRCALL calls from different threads conventional memory than BREQUEST. available from Btrieve Technologies? simultaneously, the interface DLL assigns the same client ID for each thread. Therefore, the BTI’s ODBC Interface for Windows 95 Can I mix 16-bit Windows and Win32 will be available in early 1996. The ODBC second and any subsequent thread is blocked Interface is designed as a high performance, applications all accessing the same local until the engine processes the first thread’s 32-bit interface for access to Btrieve data on or remote engine? request. To allow multiple threads in your Windows 95. Yes. There is no limitation to the number of application to be processed concurrently, you processes you can run in parallel other than the must build your own client IDs and use the available system resources. BTRVID or BTRCALLID interface. This way, you Can I run more than one 16-bit To access remote and local files can maximize performance when accessing files Windows application in the same simultaneously using the requester and the through the local engine. The interface DLL WOW box on Windows NT? workstation engine you must configure the 32-bit limits the maximum number of client IDs that an With the new interface DLL, you can run DLL interface for both local and requester access. application can use at one time to 64. up to 64 16-bit Windows applications or You can do this through the Setup utility. The

10 Btrieve Developer's Journal Winter 1995 At any time, the engine allows only one client to change a particular file. If the engine is ODBC INTERFACE processing a write request, every other write operation on that file is suspended inside the engine. If you have several files to change ODBC INTERFACE V1.0 PERFORMANCE COMPARISON through the local engine, you may further Times are indicated in seconds. All ODBC performance testing was conducted improve performance if you make the INSERT, using 10,000 records on a 90-MHz Pentium machine with 32MB of RAM. DELETE, UPDATE, CREATE, or DROP INDEX calls for each file or group of files from the same unique thread. You should use different client IDs for each unique thread. The communication link between the requester session and the Btrieve server is not re- entrant. If you have a distributed database with files on different remote servers and your application is using the requester and the remote Btrieve server to access the data in those files, it is highly recommended to have a separate thread for each remote server. Once a call is made, that connection is blocked until the request is processed and the result is sent back. If you operate on a particular file only through the thread that was assigned to that particular server, you may block access to any other file on that BTI has released 2 versions of it’s high designed from the start to provide high server from the application, but other threads performance ODBC Interface: ODBC Interface performance access to Btrieve and Scalable SQL (each against its respective server) can still access for Windows v1.0 (16-bit) and ODBC Interface data. The performance comparison above tells files in parallel. for Windows 95 v1.0 (32-bit). BTI’s ODBC the performance story. Users can expect Use caution with the number of threads Interface is a high performance interface that dramatic performance improvements over the you start. Threads consume system resources fully exploits BTI’s SQL parsing technology and ODBC products from Intersolv or Microsoft. and can significantly impact your overall database engine performance features. It was Continued on next page... performance.

WHO’S WHO AT BTI

Ted Doucet Sandy Hoffman Richard Stroum

Vice President, Director of Vice President, Sales Inside Sales Support

As Vice President of Sales, Doucet leads Sandy Hoffman, BTI’s Director of Inside Richard Stroum recently joined BTI as the BTI North American sales organization. Sales, is responsible for the management of Vice President of Customer Service. Stroum is The sales organization is responsible for direct BTI’s inside sales organization and the responsible for the delivery of responsive and and indirect sales of BTI’s products. revenue associated with the sales of BTI’s timely support to Btrieve customers. Prior to joining BTI, Doucet was Director products both direct and through the channel. With prior experience as Vice President of Business Development and Sales for MCC’s Prior to joining BTI, Hoffman was of Customer Support at Atex Publishing Internet client/server electronic-commerce responsible for the telesales organization for Systems and as Director of Software Support products, EINet. Prior to his leadership in the Technology Works and ABMRA Computer at Interleaf, Stroum has provided the vision launch of EINet, Doucet was responsible for Corporation Subsidiary. From 1988 to 1993, and direction for the development of world the development and growth of MCC’s Hoffman provided sales leadership for DELL class support operations. Handling over 6,000 consortial software projects. Doucet also Computer Corporation. During her tenure at calls a month at Interleaf, his organization provided sales leadership to Edify, Sybase and DELL, she was responsible for the DELL provided excellent over-the-telephone support DEC. Direct Division, an inbound sales center with while providing valuable information through Doucet has a B.B.A. degree in General annual revenues of $600 million. world wide access to a corporate knowledge Business with a minor in Computer Science Hoffman has a B.B.A. in Marketing and a base, CD ROM based information, and access from Stephen F. Austin State University, and B.B.A. in Management from the University of via the Internet. has completed the Dale Carnegie Program. Texas at Austin.

Winter 1995 Btrieve Developer's Journal 11 Workstation vs. Client/Server Visual Basic, PowerBuilder, Delphi, and others ODBC CONTINUED... Configuration to access their Btrieve and Scalable SQL data.

There are two configurations for the ODBC What is ODBC? ODBC Conformance Levels Interface, depending on whether the underlying engine configuration is a client/server or a ODBC (Open Database Connectivity) is a ODBC defines conformance levels for workstation-based engine configuration. In either interface/driver writers in two areas: ODBC API standard introduced by Microsoft Corporation, case, before users install BTI’s ODBC Interface, that allows applications to access data in various and ODBC grammar. Btrieve v6.15 (or higher) and/or Scalable SQL BTI’s ODBC Interface is Level 1 ODBC API DBMS providing maximum interoperability i.e. a v3.01 (or higher) must already be installed. single application can access different DBMS. compliant i.e. functionality for all at Level 0 This enables application developers to develop, and Level 1 is provided. Many of the level 2 APIs compile, and ship an application without are also supported. In addition, BTI’s ODBC targeting a specific DBMS (i.e. Btrieve and/or Interface provides both ODBC Minimum and Scalable SQL.) Core SQL grammar. Some extended grammar BTI’s ODBC Interface is designed as a third features are also supported. data access module to the MicroKernel Database Engine (MKDE). This allows users to access the Interface Package Contents same database from Btrieve, Scalable SQL or ODBC. Along with the interface DLLs, the ODBC package contains the ODBC Interface Reference Manual, which describes how to configure an ODBC data source, lists hardware and software requirements, and includes information on ODBC grammar and APIs supported, on how to program using ODBC, and on SQLSet/ GetConnectOption and SQLGetInfo values. The package also contains source for a sample C program that uses the ODBC interface to gain access to Btrieve/Scalable SQL data and a set of dictionary files (DDFs) which define a sample database. Additional material includes a README file which contains useful information on things that the installation program does, as well as how to use the interface with popular front-ends, and licensing and registration information. APPLICATION INTERFACE ARCHITECTURE FOR WORKSTATION-BASED ENGINES Availability THE WORKSTATION-BASED ARCHITECTURE INCLUDES STANDALONE, PEER TO PEER, AND FILE-SHARING ON The ODBC Interface for Windows and/or NETWORK CONFIGURATION. the ODBC Interface for Windows 95 are currently available as part of a Commercial Deployment Kit or as part of a single seat Performance Workstation Engine for Btrieve or Scalable SQL. For more information about Commercial BTI’s ODBC Interface was designed to Deployment Kit and single seat licensing, see the provide high performance access to Scalable related article on page 13. SQL and Btrieve data. The interface takes maximum advantage of Scalable SQL and Btrieve indexing capabilities, multi-row fetches, owner names, and other features to provide high performance and seamless integration with Scalable SQL and Btrieve data. Also, the interface supports a plethora of data types (such as float, numeric, decimal, bfloat, int, char, time, date, lvar etc.) provided by the underlying MicroKernel Database Engine.

Support for Third Party Products

Using BTI’s ODBC Interface, users can run APPLICATION INTERFACE ARCHITECTURE FOR popular front end tools such as Microsoft Access, SERVER ENGINES

12 Btrieve Developer's Journal Winter 1995 TECHNICAL INSIGHTS StepNext, etc), you must tell Btrieve how much Writing Variable Length Records Accessing Variable Length Btrieve Files room you have for the record to be returned. When inserting or updating a record in a Btrieve, Any Version This is done by setting the DataBufferLength variable length Btrieve file, you must tell Btrieve parameter to the size of your entire DataBuffer, How do you access variable length Btrieve how much data to write. This is done with the which can accommodate the maximum amount files? The most important factor when accessing DataBufferLength parameter. This parameter of data. You should never set your variable length Btrieve files is how to set and should be set to the size of the fixed length DataBufferLength to a value larger than the interpret your databuffer length parameter. This portion plus the amount of real data in the number of bytes allocated to your DataBuffer; parameter tells Btrieve how much data to insert variable portion. Do NOT set the doing so could lead to a memory overwrite or update in your file; it also tells your DataBufferLength to the fixed length plus the when running your application. application how much data Btrieve read from the maximum size your application allows for the After a successful read operation, the file. variable field; if you do, Btrieve will always write DataBufferLength parameter will be changed to the maximum size. For example: Creating a variable length record file reflect the size of the record that was actually When you create a variable length Btrieve #define FIXED 67 returned. Your application should use this value file, you tell Btrieve how long the FIXED portion employeeRecord.id = 1001; to determine how much data is actually in the of the record is, and set a flag inidicating that the strcpy (employeeRecord.lastName , “Anderson”); DataBuffer. If the record Btrieve tries to return is file should also support a VARIABLE portion at strcpy (employeeRecord.firstName , “Linda”); longer than the value specified by the the end of the record. The fixed portion must strcpy (employeeRecord.phoneNumber , DataBufferLength, Btrieve will return as much exist in every record that you insert into the file; “512-794-1719”); data as was specified, and return a status 22. strcpy (employeeRecord.comments, the variable portion is optional. You do not tell “Variable Length Record Test”); The following is an example of a GetEqual Btrieve how long the variable portion may be. operation (assume key 0 is the id field): dataBufferLength = FIXED + Btrieve workstation engines support a record size strlen (employeeRecord.comments); //C Example (FIXED + VARIABLE) up to 64K; Btrieve server status = BTRV(B_INSERT, posBlock, engines support a record size up to 57K. Btrieve &employeeRecord, &dataBufferLength, // v6.10 or higher also supports variable length keyBuffer, 0); int dataBufferLength, records larger than 64K with the addition of idKey, status; chunk operations, but these are not discussed in Note that the dataBufferLength is computed this article. as the fixed length portion plus the amount of memset(&employeeRecord, 0, data in the Comments field (27 bytes), not the sizeof(DataBuffer)); Application Setup size of the Comments field (1000 bytes). When idKey = 1001; When designing your application, you must dataBufferLength = sizeof(DataBuffer); //1067 programming in C, you may also want to include status = BTRV(B_GETEQUAL, PosBlock, decide the maximum size of the variable length the null (binary 0) character after the data in the &employeeRecord, &dataBufferLength, portion of the record your application will variable portion of the record that is inserted into (char *)&idKey, 0); support. You should setup a structure for your the Btrieve file. This is done by setting // DataBufferLength should now be 94 records that accommodates the fixed portion dataBufferLength just prior to the operation. 'Visual Basic Example plus the maximum size of the variable portion. The same code in Visual Basic would look Use this structure as your databuffer in the ' like this: Global Const FIXED = 67 Btrieve calls when accessing your variable length Global Const FIXED = 67 file. Here are two examples of data structures set idKey% = 1001 EmployeeRecord.id = 1001 ' set the value of dataBufferLength to 1067 up to handle variable-length records, one in C EmployeeRecord.LastName = “Anderson” dataBufferLength = length(EmployeeRecord) and one in Visual Basic. EmployeeRecord.FirstName = “Linda” status = BTRV(B_GETEQUAL, PosBlock$,_ EmployeeRecord.PhoneNumber = “512-794-1719” EmployeeRecord, dataBufferLength,_ //C example text$ = “Variable Length Record Test” idKey%, 0) // EmployeeRecord.Comments = text$ ' the following line extracts the typedef struct{ dataBufferLength = FIXED + length(text$) ' variable portion returned by Btrieve int id; status = BTRV(B_INSERT, PosBlock$,_ ' into the text$ variable char lastName[30]; EmployeeRecord, dataBufferLength,_ text$ = LEFT( EmployeeRecord.Comments,_ char firstName[20]; keyBuffer, 0) dataBufferLength - FIXED ) char phoneNumber[15]; char comments[1000]; Again, the dataBufferLength is the fixed HINT: While developing and debugging } DataBuffer portion plus the amount of actual data in the your application, it helps to display the struct DataBuffer employeeRecord; variable portion, not the maximum size. DataBufferLength just before and after the HINT: While developing and debugging read operation to verify that it is set correctly 'Visual Basic example your application, it helps to display the at each point. ' DataBufferLength just before the Insert or update In these examples, the DataBufferLength Type DataBuffer call to verify that it is set correctly for the amount before the read should be 1067, and after the id AS integer of data you have. read it should be 94. LastName As String * 30 In these examples, the DataBufferLength FirstName As String * 20 before the insert should be 94, not 1067. PhoneNumber As String * 15 Windows 95 Support Comments As String * 1000 Btrieve v6.15, Scalable SQL v3.01 Reading Variable Length Records End Type The following is a summary of our Btrieve When reading a record from a variable Global EmployeeRecord As DataBuffer and Scalable SQL support for Windows length Btrieve file (GetFirst, GetNext, GetEqual, applications in the Windows 95 environment.

Winter 1995 Btrieve Developer's Journal 13 Btrieve for NetWare v6.15 Installation and Operation manual included with arcnet environments) status 91 will persist. In this The existing Windows 16-bit requester is the Btrieve for NetWare and Btrieve for NT case, go back to the control panel/network/ unstable in a Windows 95 environment; some products is missing information on how to do nwlink ipx/spx tansport protocol and remove customers can get it to work, some can’t get it to this. An end delimiter must be specified after one of the frame types (the one that is not being work at all (status 20 or workstation hang), and each command in order to use multiple used). This will not cause the internal network some get it to work erratically with random commands in the BUTIL command file. number to change to zero; the internal network hangs and 20s after successfully connecting to The following should appear under the number will remain a non zero value. Restart the NetWare Btrieve and accessing files. - there is Rules for Command Files section: "When you server; then to verify that the internal network now a Windows 95 specific requester to support specify multiple commands, end each command number did not change, run IPXROUTE both 16- and 32-bit applications running on a with a space and or [end]." For CONFIG at the DOS prompt. Also, go under Windows 95 workstation. Anyone who has example, a Command file called control panel and check the internal network purchased Btrieve for NetWare (or Btrieve for REBUILD.CMD could be set up as follows: - number. By removing one of the frame types, the NT) v6.15 is eligible to get this requester. If you 91 should be resolved. Keep in mind that you need the new requester, please provide the RECOVER sys:data\patients.dta first have to pick two frame types in order to be following information to technical support: sys:data\patients.out -CLONE able to set the internal network number. Then, sys:data\patnew.dta Platform (NetWare or NT), user count, and serial restart the server and go back and remove the sys:data\patients.dta -LOAD extra frame type. number. Send this information to one of the sys:data\patnew.dta sys:data\patients.out following addresses to the attention of the Technical Support Coordinator: SSQL-22 Error with ODBC Then, the BUTIL.NLM could be used to FAX: 512-794-1778 ODBC for Windows, v1.00 CompuServe: 74431,3337 execute these commands by specifying the Internet:[email protected] following at the NetWare server console: The error SSQL-22 may be returned from Future purchases of these server engines will LOAD BUTIL @sys:dat\rebuild.cmd the Btrieve Technologies ODBC driver when using the ODBC Administrator to configure a include this new requester in the box. data source. This error usually indicates that the Btrieve for Windows v6.15: - this worksta- Status 91 from a Windows NT wrong version (pre-6.15) of the Btrieve Windows tion engine works under Windows 95 - the Workstation requester is being used, such as the 13K 6.10c requester components provided with this Btrieve for NT Server, v6.15 version of WBTRCALL.DLL. The problem is product (16K WBTRCALL.DLL & BREQUEST) resolved by putting the 6.15 or later version of are unstable under Windows 95. A status 91 “Server Error” can occur on a WBTRCALL.DLL in the windows\system Windows NT workstation using the NT requester directory. Scalable SQL for NetWare v3.01 when attempting to access a file on a Windows There is no Windows 95 specific requester NT Server running the Btrieve engine. This may for SSQL - the existing 16-bit Windows 3.x happen when the frame types are set for Auto- Session IDs in Scalable SQL requester for SSQL is unstable in a Windows 95 detection (in the Control Panel, Network, and Scalable SQL v3.01 environment (see explanation above for 16-bit NWLink IPX/SPX Compatible Transport). When Btrieve requester) - there are no plans to provide this occurs, the NWLnklpx Network number is The value returned as the session ID on an a true Windows 95 requester until the 4.0 either set to a zero or to a non-zero value; yet xGetSessionID function call in Scalable SQL has Scalable SQL timeframe IPXROUTE CONFIG (an NT command line changed. Between releases 3.00b and 3.00c of NetWare SQL, two new features were added: Scalable SQL for Windows v3.01 utility) still shows the network number as being 00000000, even after restarting the system. It multiple login support, and the new function The SSQL Workstation Engine, along with appears that the Auto-Detection may be causing xShareSessionID for Windows. Prior to these the Btrieve for Windows v6.15 Workstation the problem. new features, the session ID returned from Engine, works under Windows 95 - the SSQL xGetSessionID on the workstation was the actual To avoid this problem, set “NWLink IPX/ Workstation Engine can also be used with the session ID returned from the engine. This could SPX Compatible Transport” frame type to Btrieve Windows 95 requester for 16-bit no longer be supported with multiple logins manual mode (select at least 2 frame types so applications when accessing data on a NetWare because an application could potentially login to that the internal network number remains set). or NT server running a Btrieve server engine. two different Scalable SQL engines, and get the Set the Internal Network Number to a unique In summary, the only Btrieve client/server same engine session ID on both. Therefore, the non-zero value. Set the network number to a configuration that is supported under Windows requester was changed so that the session ID non-zero value in the REGISTRY. To reach the 95 is 16- or 32-bit Btrieve Windows applications returned on an xGetSessionID call is an index network number, take the following path: using the Windows 95 specific requester. The into a local table, and the requester takes care of only Scalable SQL configuration that is sup- HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ actually mapping this index into the ‘real’ session ported is the Scalable SQL for Windows client Services\NwlnklPX\ NetConfig\\NetworkNumber. The session IDs shown in SQLMON are the client engine or the Btrieve Windows 95 ‘real’ engine session IDs. These merely start at 0 Note: IPXROUTE CONFIG displays the requester. Btrieve Technologies is investigating and increment as applications login. Before Internal Network Number (if set), as well as all support for the Scalable SQL v3.01 windows multiple login and xShareSessionId support, other bound networks with associated network requester in a Windows 95 environment. unique session IDs for each login was an numbers and frame types. undocumented feature of the xGetSessionID function. However, since these session IDs are BUTIL Documentation Update The README file that came with Btrieve for Windows NT Server states that the Internal no longer returned to applications, Btrieve for NetWare v6.15, Btrieve for NT v6.15 NetWork number should be set to a non-zero xGetSessionID is not going to provide a unique Command files used in conjunction with value. The only way to do this is to set the frame identifier to an application. the File Manager Utility (BUTIL) can specify types via manual mode. multiple commands. However, the Btrieve For some users (possibly related to some

14 Btrieve Developer's Journal Winter 1995 Dropping/Adding Specific Key sometimes a 1002 will be returned, indicating a For a CASE-insensitive index, the case of Numbers problem with memory management by the data is ignored when sorting the data. Windows. Specifying that an index is CASE-insensitive Btrieve, v6.15 With Btrieve for NetWare v6.15 and causes Btrieve to create and maintain that key BUTIL v6.15 supports dropping and adding Btrieve for NT v6.15, a new Btrieve Windows using the UPPER.ALT alternate collating specific key numbers without renumbering in 6.x requester is provided that no longer requires the sequence. format files. By default, dropping an index causes DOS Brequest TSR loaded before Windows. Following is an example to demonstrate the Btrieve to renumber subsequent keys so that all This new “DLL requester” consists of a different types of fields: keys are numbered sequentially starting at 0. To WBTRCALL.DLL that is either 38K or 42K in size drop a specific key number without renumber- (depending on what release you received). As a CREATE TABLE Test USING “TEST.DAT” ing, add 128 (hex 80) to the key number result, the 1002 errors have been virtually ( Name1 CHAR(10) CASE, Name2 CHAR(10) parameter. For example, the following command eliminated. Contact your local Btrieve Technolo- ) will drop key number 2 without renumbering gies reseller for more information about the 6.15 WITH INDEX (Name1 CASE, Name2) subsequent keys: server versions of Btrieve. BUTIL -DROP file.btr 130 INSERT INTO Test VALUES(“John”, “Doe”) ODBC Error VALUES(“jane” “doe”) This functionality is also available for use with ODBC for Windows, v1.00 VALUES(“JOHN”, “BROWN”) the Drop Index operation (op code 32). A “User Name/Group Name Invalid” error To add an index with a specific key SELECT * FROM Test WHERE Name1 = “john” indicates an expired Beta version of the ODBC number, the new keywords “usekeynumber” driver. Users encountering this error should Name1 Name2 and “keynum” must be added to the description contact a Btrieve Technologies reseller to get the ------file. For example: released version of the ODBC driver. John Doe usekeynumber=y keynum=3 position=40 JOHN BROWN length=5 duplicates=y modifiable=y Case Insensitivity With Scalable SQL Since Name1 is a case-insensitive field, the type=Lstring alternate=n nullkey=n And Btrieve segment=n restriction will find both John and JOHN. Since Scalable SQL, v3.x there is also a CASE-insensitive index on Name1, Using the command: With Btrieve, if a string, lstring or zstring this index will be used for an optimized search key is created with the UPPER.ALT alternate rather than scanning the entire database. BUTIL -SINDEX file.btr file.dsc collating sequence, the case of the data in the SELECT * FROM Test WHERE Name2 = “Doe” key is ignored when performing a search on that will add the specified index number to the Name1 Name2 Btrieve file. This functionality is also available for key. For example, if a record is inserted with the ------use with the Create Index operation (op code key value “test”, this record can be retrieved by 31). doing a GetEqual with a KeyBuffer parameter John Doe containing the value “TEST”, “Test”, “test” or any other combination of upper and lower case Since Name2 is a case-sensitive field, only Status 1002 in Windows letters. In addition, if two records are inserted exact case matches to “Doe” will be returned. Btrieve for NetWare, v6.10x with the values “test” and “TEST”, they are Since there is a case-sensitive index defined for considered duplicate key values. GetEqual on Name2, it will be used for an optimized search Windows Btrieve applications run with the rather than scanning the entire database. 6.10 or 6.15 DPMI version of the Btrieve for any case representation of “test” will always return the first record entered. When scanning Windows requester often receive a status 1002 - SELECT * FROM Test ORDER BY Name1 the key values for this key, it may appear that ”Insufficient Memory”. The DPMI version of Name1 Name2 WBTRCALL.DLL (13K or 16K) requires the DOS Btrieve is not sorting the values properly, since ------requester, BREQUEST.EXE, to be loaded before “test” will be returned before “TEST” if the starting Windows. The error 1002 is being records were inserted in that order. jane doe returned because WBTRCALL.DLL is asking Case searches work a little differently with John Doe Windows to allocate conventional memory with NetWare SQL. There is a CASE keyword which JOHN BROWN the GlobalDosAlloc() function call. The amount indicates that a field or index should be treated of conventional memory being requested is 411 as case- insensitive (i.e. upper and lower case This query returns all records sorted by the + xxxx bytes, where xxxx is the value of the /d: letters will be treated the same). There are two case-insensitive Name1 index. Since John was parameter specified when loading Brequest.exe situations to consider. The CASE keyword can be inserted before JOHN, it is returned first before starting Windows. If no /d: is specified for specified for any string, lstring or zstring field in according to the case-insensitive index (they are Brequest, a default value of 4096 is used. The the dictionary and/or for any string, lstring or treated as duplicates), even though the ASCII 1002 error is returned to a Btrieve application if zstring index. table would indicate that JOHN should be sorted Windows returns an error on the For a CASE-insensitive field, restrictions are first. GlobalDosAlloc() call. This means, Windows evaluated regardless of case. So, a record A confusing situation might occur if a field won’t give WBTRCALL.DLL the conventional containing a Name field with the value “John” is defined as case-insensitive and that field is also memory it needs. This occur when either there is will be returned when a restriction of ‘Name = an index, and the index is defined as the not enough conventional memory, or when “JOHN”’ is specified. If CASE is not specified for opposite: case-sensitive. Since the case- Windows can not find a large enough contigu- a field, only exact matches with the value in the insensitive field requires the engine to find all ous block of conventional memory. Sometimes, restriction will be returned, regardless of whether matches regardless of case, the index can not be this error can be returned erratically by Windows or not there is a CASE insensitive index specified used to optimize this search. In this case, a full - sometimes the application will work and for this field. table scan will be performed utilizing

Winter 1995 Btrieve Developer's Journal 15 TECHNICAL INSIGHTS CONT'D... CURRENT V ERSIONS

StepNextExtended calls with a filter defining the looking for only the exact matches, which will Btrieve Data Management Products string to search for, and matches will be returned be returned to the query. regardless of case. The time this takes will Btrieve Engine for DOS...... 6.15 depend on the size of the database. Btrieve Developer Kit for DOS...... 6.15 Data Access Language Support Alternatively, if a field is defined as case- Scalable SQL, v3.01 sensitive, and that field is also an index that is Btrieve Engine for Windows...... 6.15 defined as CASE-insensitive, the situation When Btrieve Technologies purchased the Btrieve Developer Kit for Windows.....6.15 changes again. This time, a restriction on the Scalable SQL technology from Novell, the DAL field implies you only want exact matches. Since technology was not included. Therefore, this Btrieve Engine for OS/2...... 6.15 component could not be included in the current the index exists but groups all the different case Btrieve Developer Kit for OS/2...... 6.15 entries as duplicates, we can still utilize the index version of Scalable SQL v3.01. rather than scanning the entire database. We will, of course, have to scan all the duplicates Btrieve for NetWare Server...... 6.15

Btrieve for Windows NT Server...... 6.15 Btrieve Dev Kit for Win NT Server...... 6.15 BTI AUTHORIZED CHANNEL PARTNERS Scalable SQL Relational Data AUSTRALIA NETHERLANDS Fagan 3-9699-9899 Artefact 15-617532 Management Products Scalable SQL for DOS...... 3.01 BANGLADESH NORWAY Applied Computers 2-833-647 NetCenter 67-580-720 SSQL Developer Kit for DOS...... 3.01 Scalable SQL for Windows...... 3.01 BELGIUM POLAND IQN 16-502381 ABC DATA 2-633-7011 SSQL Developer Kit for Windows...... 3.01 Junisoftex 32-315-131 BRAZIL Scalable SQL for NetWare...... 3.01 Ossae-Komi 21-987-9673 RUSSIA SSQL Dev Kit Supplement for OS/2.....3.01 ELCO 095-131-5555 CROATIA Lanit 095-267-3038 SYS Informacijski 41-615-223 R-Style 095-903-0058 Query and Reporting Tools ZECH LOVAK EPUBLICS C & S R SLOVINIA Abakus 2-2451-0942 OPAL 64-632-359 SWS 67-981-446 Xtrieve for DOS...... 4.11e SOUTH AFRICA Xtrieve for OS/2...... 4.11e FRANCE SYS:COMM 11-886-7812 Micro Sigma 1-4622-9988 SPAIN GERMANY 5 Generacion 1-639-4611 Compu-Shack 2631-9830 Sienersoft 6126-5950 SWEDEN SOS 821-257-820 Linsoft 13-111-588 HOW TO REACH BTI Scribona 8-734-3400 HUNGARY Btrieve Technologies, Inc. 3Soft 1-212-2552 THAILAND Walton Networking 1-267-9010 Thaisoft 2-2377-61231 8834 Capital of Texas Highway North, Suite 300 Austin, Texas 78759 INDIA UNITED KINGDOM Phone: (512) 794-1719 Integra 80-225-0073 Southdown House 1-30687-7998 (800) BTRIEVE System Science 171-833-1022 ISRAEL Mashov 3-7520190 UNITED STATES/CANADA Fax: (512) 794-1778 GATES/Arrow 800-332-2222 CompuServe: GO BTRIEVE ITALY 803-627-2100 Web Site: http://www.btrieve.com/ A&B 10-277-0530 OPC LAN 2-287-0083 GBC/Vitek 800-229-2296 E-mail: [email protected] 609-767-2500 [email protected] JAPAN [email protected] AG-Tech 52-951-2706 Programmer's Shop 800-421-8006 Novell Japan 3-5481-1161 617-740-2510 E-mail addresses for individual staff members KOREA Tech Data 800-237-8931 consist of the person’s first initial followed by up Suntek 2-715-4796 to seven characters of his or her last name.

16 Btrieve Developer's Journal Winter 1995 Inside the Windows NT/Windows 95 Btrieve Box By Douglas J. Reilly Access Microsystems, Inc. Email: [email protected]

Like the rest of the world, Btrieve developers are moving to testing the 16-bit “thunking” to the 32-bit engine. “Thunking,” for the latest and greatest that Microsoft has to offer: The 32-bit those new to the term, is the process of changing a 16 bit call into Windows programming environments, Windows NT and Windows a 32 bit call, and vice-versa. In order to use the Windows NT/ 95. Btrieve Technologies, Inc. has recently introduced a new Windows 95 Btrieve engine with older, 16-bit Windows Btrieve- version of the developer’s kit to address this, the Btrieve based applications, you need to make sure that your BTI.INI Developer’s Kit for Windows NT/Windows 95. contains the line THUNK=YES (the default (ed. note: the spell- Before you open the box (or order the box, for that matter), you checker suggested “ThankLess”)) and that the following DLLs are need to ensure that your equipment is up to the task. Your workstation available on the path: WBTRCALL.DLL, WBTRTHNK.DLL, must be running Windows NT 3.51 or Windows 95, and you must WBTRV32.DLL, and BTRVRES.DLL. have 16 meg if RAM. At a time when the developer community was My normal benchmark application to test for a valid Btrieve up in arms over the Microsoft Access RAM requirement of 12 meg, installation is Microsoft’s Access. Access has the advantage of the 16MB requirement could limit market penetration, but it is a brave being available on many machines, and it is just finicky enough to move given the number of people who would be disappointed if the fail in places where some applications might work, acting as a fair requirements were lower, but the program did not perform well. I test of the correctness of the installation. Unfortunately, the ISAM expect (but did not test this expectation) that if the program works in driver that was available for Btrieve in version 2.0 of Access could 16 meg on Windows NT, Windows 95 might actually work with less not be recompiled for Access 95, since 32-bit Btrieve was not memory. available soon enough to meet the Access 95 release date. This led The installation process is, as one would expect from any me to decide to investigate developing my own 32-bit application, current Windows program, automated. The default installation which lead me to Borland C++ version 4.52. directory is “C:\Program Files\BTI.” That’s correct, the directory The general elements of the Btrieve interface are identical to name contains a space, though when the previous Windows 3.x version fooling around at the DOS level, 6.15 package. BTRV() or BTRVID() “C:\Program Files” becomes remain the preferred interface “C:\PROGRA~1.” This Program Files The actual programming functions to be called. For DOS directory is the place where programs required with Windows Btrieve programmers, BTRVID might are supposed to be installed in Windows be new. This is a function, almost 95, rather than in the root directory as NT/Windows 95 Btrieve is identical to BTRV(), but with the has been tradition among DOS and really not very different addition of a clientID parameter. This Windows 3.1x developers. The parameter, defined as a pointer to an installation proceeded in the normal from the previous version array of 16 BTI_BYTE’s, is used to manner, from two diskettes, with a third of Btrieve for Windows 3.1 differentiate between multiple clients diskette and business-reply mailer on a single computer. The first 12 provided to allow you to save registration bytes of the array must be set to information on diskette, as a convenient binary 0 (not the zero character, hex means of registering the product with BTI. As any good Windows 31). The remaining 4 bytes should be set to some unique value. 95 program should, the developer’s kit allows you to uninstall the The first two of these remaining bytes should be set to some value kit from the Add/Remove programs icon in the Control Panel. to identify the application, with the remaining two bytes set to a Windows NT installation places the files by default in value to identify the instance of the running application. Other C:\BTI\WIN32. families of functions which are sometimes used to access Btrieve Upon loading the developer’s kit, the first problem becomes are BTRCALL() and BTRCALLID(), functions that are Windows evident: how to test the installation? While the Btrieve Function and OS/2 compatible only, and BTRCALL32() and Executor is available, I always like to test a new Btrieve for BTRCALLID32() which are only OS/2 compatible. Windows installation by running another program. I was able to The BTRCallback function, used in Windows 3.x versions to test it with Smithware’s DDF Builder (after some tweaking with allow the programmer to register a function that the MKDE can the path), but since DDF Builder is still 16-bit, as are all of the call to empty the message queue while Btrieve processes a call, is utilities provided with the Developer’s Kit, even this test was only not needed in the Win32 world, but the interface is still supported, though ignored. In the Windows 3.x world, Windows applications

Winter 1995 Btrieve Developer's Journal 17 used what is called cooperative multitasking. Using this model, you plan to write applications which use multiple threads. applications “cooperated” by periodically calling operating system Some functions from previous Windows versions are now functions to allow Windows to switch to other tasks and handle obsolete (and have been ever since the introduction of Btrieve for messages sent to those tasks. This was required because some tasks, Windows version 6.15). BTRVINIT(), BTRVSTOP(), for instance creating an index on a large Btrieve file, could require RQSHELLINIT(), WBRQSHELLINIT(), WBTRVINIT(), many seconds, or even minutes or longer, to perform before they WBTRVSTOP() and BRQSHELLINIT() are all still supported in would return control. Before the callback function was allowed, the interface, but do not serve the purpose for which they were these Windows applications would simply hold up the machine until originally intended. the function ran to completion. To compile C/C++ applications using Btrieve for Windows Incidentally, Windows 3.1 already supported the “better” type NT/Windows 95, there is a new variable to be #define’d or defined of multitasking, called preemptive multitasking, but this was only in the make file or the IDE. Defining BTI_WIN_32 allows the available when running applications within an MS-DOS box. This included files to correctly set up data types and function was required because by definition, these MS-DOS applications did declarations. Interestingly, Win32 console applications can call the not yield control, since they were written as if they owned the world Btrieve DLL just as easily as Graphical User Interface (GUI) that is your PC. applications. This is most useful for us article-author-types who Preemptive multitasking within the Win32 environments works need to create quick and easy benchmarks, but it also allows real- like this (greatly simplified): Programs run for a given time slice, world programmers to create a procedural part of an application and when that time slice is over, the program is preempted and (for instance, processing a number of Btrieve records) outside of another program runs. This is much better the event-driven GUI. Some kinds of than cooperative multitasking, since the debugging can be easier in a console cooperation requires programmers to be application, and often the console perfect in yielding to the operating system, My informal tests indicated application can be conveniently something they have been largely unable little actual raw performance converted to a Dynamic Link Library or unwilling to do, thus making the reset difference between the 16 bit and then called from a GUI switch much more popular than it ought to application. be among end-users. Preemptive engine and the 32 bit engine. The actual programming required multitasking also requires changes in the To gain the perception of a with Windows NT/Windows 95 way a programmer thinks about more responsive system you Btrieve is really not very different programming. In the MS-DOS world, the from the previous version of Btrieve programmer could assume he or she owned will need to have code that is for Windows 3.1. Essentially the same the computer, and could do all manner of written to use the features of application (compiled and running as awful things to ensure that the task at hand the 32 bit engine. Without this an EasyWin program under Windows was completed. In the Windows 3.1 world, 3.1 and as a console application in we became aware of others, and our rewrite, you will gain relatively Windows 95) completed a copy of a programming task had to include allowing little, and you will limit your large Btrieve file in about the same other tasks to run, but we still had control market to users who have the time: One minute and thirty-five over how often they got the chance (when seconds for the Windows 3.1 version, our programs were in control). In the required hardware. and two seconds faster for the Win32 world, we have no say (OK, very Additionally, tools that fully Windows 95 version. The resulting little say) over how long we run and when support the 32 bit environment files were about the some size (the other programs run. In addition, we can slightly larger file created by the use multiple threads of execution, which are not yet widely available, Windows 95 test program). allows us to do other things while awaiting and Btrieve 32 bit tools are no The documentation is very similar completion of time-consuming tasks such exception. to previous versions, including a as that index creation Programmer’s Manual and a Btrieve described above. Other tasks that might for Windows NT/Windows 95 have been handled in a callback function Installation and Operation manual. One can now be handled more conveniently in a separate thread. thing that immediately struck me about the manual was the use of With this new-found power comes added responsibility. Just as the abbreviation MKDE. After searching early pages, I was able to we once assumed our MS-DOS programs owned the world, we have discover that this referred to the MicroKernel Database Engine. long assumed that our Windows 3.x programs owned their global The Windows NT/Windows 95 Developer’s Kit handles access variables. In the Win32 world, these variables cannot be handled as to local and server based files transparently, without requiring the if a particular thread in a multiple thread application owns them. In loading of a DOS-based BREQUEST.EXE (which is a good thing playing with real world applications, I discovered that my use of in the case of NT, where loading the requester would not be Btrieve file objects of a type that I designed for encapsulating possible). Access to files using both NetWare and Windows NT Btrieve file handling as global objects created a potential for disaster server-based MicroKernel Database Engines is supported. as the application moves to multithreading. Just as having two Several setup options appear that have not appeared in copies of a Btrieve position block in a single-threaded application previous versions of Btrieve I have used on a workstation. These can cause file corruption, so can having two threads in a Win32 allow you so set the number of worker threads initially spawned, application use the same position block while doing different things with a default of 1 (additional threads can be spawned as needed). with the file the position block refers to. If you do not understand I/O threads have a default of 4, with this value being the number any of this, reading any good Win32 programming book that that will be spawned, with no growth possible. The manual discusses threads and thread synchronization will be instructive if suggests one thread for each file opened at the some time. The

18 Btrieve Developer's Journal Winter 1995 Mergesort Temp Sorting directory can be set, and this directory is Early 486’s, with clock speeds as low as 25 Mhz and as little as 4 used for temporary work files. For NT configurations, the target meg of RAM abounded. This customer, for one, is not ready for engine can be set to workstation or server, to allow Windows NT or Windows 95, and no amount of prompting on my W32MKDE.EXE to process the request (workstation) or pass the part would hurry them along. request to NTMKDE.EXE (the NT server engine - server). A second factor is whether you plan to take advantage of the While compiling my sample application, I discovered one new environment. My informal tests indicate little actual raw unusual issue that could catch the unaware programmer and cause performance difference between the 16 bit engine and the 32 bit problems. The Microsoft and Borland C/C++ compilers use engine. To gain the perception of a more responsive system different versions of the import library (.LIB) file. (possible by using the multithreading capabilities of the Win32 Examples are provided for BASIC, Visual Basic, C/C++, platforms) you will need to have code that is written to use these COBOL and Pascal programmers. Improvements to the C/C++ features. Without this rewrite, you will gain relatively little, and implementation include the use of types prefixed by BTI_ (for you will limit your market to users who are prepared (7 million in instance BTI_WORD) that isolate the user from different sizes and the first couple of months of Windows 95’s existence, but by no types of common data types (an integer can be 16 or 32 bits, means all PC users). Additionally, tools that fully support the 32 bit characters can be signed or unsigned). The data and key buffer are environment are not yet widely available, and Btrieve 32 bit tools now void pointers that allow sending the address of a structure are no exception. without casting. Will I use the Windows NT/Windows 32 development engine? Probably. As a developer, I risk career suicide if I do not move Conclusions... ahead. On the other hand, as a developer of applications that real users need to use today, I will not get rid of the older, 16 bit tools Do you need Btrieve for Windows NT/Windows 95? The just yet. decision is based upon several factors. The most important is ² whether or not your users have the hardware to run the applications you will be developing. This is a knottier problem than any pure Doug Reilly is the owner of Access Microsystems Inc., a software technical problem you will encounter. I recently produced an development house specializing in C/C++ software development, application for a customer, and while I was quite comfortable with often using Btrieve. He has had articles on Btrieve published in the performance (on my Pentium with 16 meg of RAM) the user Dr. Dobb's Journal and is the author of BTFILER and reported that the application was taking 30 seconds to get from the BTVIEWER Btrieve file utilities available on CompuServe. Doug main menu to one of the data entry forms. As I walked into the may be reached at: 404 Midstreams Road, Brick, NJ, 08724, by customer’s office where the actual application was being used, to phone at (908) 892-2683, or via CompuServe at 74040,607. my horror I discovered that this was the place where PC’s go to die. Btrieve Programming — the BDJ Special Focus Section Old-Fashioned Way Btrieve Development Tools

by Douglas Reilly, Access Microsystems Inc. by Steve Mook, Editor Btrieve Developer's Journal With all the excitement surrounding the third party tools market, and people asking “How can I access Btrieve files from Visual Basic (or Delphi or Access)” it is easy to forget that the original way to access Btrieve data is still Ever since the days of punch cards and paper tape, programmers there, and in many respects, easier to use than ever: The Btrieve Developer Kit. have looked for ways to make their work more efficient. Confronted Using the somewhat clunky Btrieve Developer Kit seems a bit retro — it’s the “one call does it all” approach to programming. Calling the Btrieve API with a technology which is at the same time extremely powerful and from Visual Basic, for example, is no tougher than declaring the function, just maddeningly complex, programmers tend to be pathologically like any call to any DLL, setting up some variables and constants, and calling optimistic. Would that I had a nickel for every time I have said to the function from the application source. All it takes is one function, six to eight myself, “There must be an easy way to do this,” plus a dollar or so for parameters, slightly fewer than a zillion possible operation codes, and instant death for your program if you screw up. It doesn’t sound very appealing, and so every hour spent looking for it. many folks are very anxious to find an alternative. We have become Btrieve itself is a result of this tendency. When I first discovered accustomed to dropping a component on the screen and letting it rip. In most it, I felt as if a great weight had been lifted from my shoulders. My cases, one of the many third party tools that ease access to Btrieve files will be program wouldn't have to remember where it had stashed each and appropriate. However, there are times when the good old Btrieve API is really “good every little piece of information I wanted to keep; instead, I could pass enough,” and perhaps even “best!” The times when this approach is useful are: my data off to a friendly little utility that someone much smarter than I When fast enough will never be fast enough. Going direct to the Btrieve had already written, and politely ask for it again when I needed it. I API will naturally be faster than using another tool that acts as a wrapper, with would, however, still be responsible for programming everything else I you calling the tool and the tool calling the API. This assumes, of course, that the Btrieve operations are identical. If a tool allows you to use extended wanted the application to do, a task which would involve not only operations, and the task at hand can benefit from using extended operations, and deciding what data to save, when to save it, and how to retrieve it, but you are not comfortable doing extended operations on your own, then the tool also painting screens, translating data, accepting and verifying user that lets you do extended operations will be faster. In any event, remember that input, and stitching together reports from bits of records and text using in most cases the overhead of the tools is greatly overshadowed by the disk access that Btrieve requires to actually do what you are asking. the “print, measure, and print again” method. Btrieve, as useful as it When you are using a language that is not directly supported. I have seen was, certainly was not going to write my application for me. requests for PERL, REXX and MUMPS interfaces to Btrieve. I have no idea if My father, at about this same time, had grown disenchanted with they exist, but I am sure that if these environments can call a DLL, I can get Lotus Symphony, and was shopping for an alternative. “What about Btrieve to work. I am sure there are joys in using a hidden jewel of a language, but easy access to Btrieve data may not be one of them. If the language in that Btrieve thing you're using?” he asked out of the blue during a question supports calling DLLs, and the language has compatible data types, phone call. Pathological optimist I may be, but I can smell the festering you can get the Btrieve data, but don’t waste too much time looking for third quagmire of uncompensated overtime from two hundred miles away. I party tools to ease the task. Just get the Btrieve Developer’s kits out and have thought for a moment about the Btrieve user interface, which was in all fun! When you are using a language like C++, and you are comfortable its glory, “Copyright (c) Softcraft, Inc. 1982-1986, All rights enough with the language, then you can roll your own objects that do exactly reserved,” and about my father, a person who to this day refers to any what you wish them to do. Way back in May of 1992, I wrote an article for data stored in machine readable format as a “T-file,” from his minimal Windows Tech Journal entitled “Wrap It Up!” about a Btrieve wrapper class experience with BASIC programming on an Apple IIe. “No,” I said, that encapsulated all the details of a Btrieve file, such as allocating and correctly sizing the data buffer, handling the position block, and keeping track of what “Not just no, hell no. That won't do at all. You'll want to find key was in use, and that also added some operator overloading to simplify something else entirely. I certainly wouldn't recommend Btrieve.” record access. This sort of thing is old hat these days, but was hot stuff back I'm not certain I would resort to the same response today, though then. There are better tools available now to do this, but I still use my home considering my father’s level of technical expertise (he still uses the last grown tools, so when anything breaks, popping under the hood is no big deal. Moving my home grown class to a C++ DLL that can be called from Delphi copy of Lotus Symphony known to survive in captivity), I'm not sure I or Visual Basic was easy enough, and allowed me to continue using constructs wouldn't, either. The applications and tools that appear on the that I am comfortable with. If you feel comfortable doing this sort of thing, give following pages of this roundup cover a very broad spectrum both in it a shot. terms of functionality (by which I mean the parts of the program I When you are coding an application that requires you to do something that the average application would not do. For instance, in developing utilities to don't have to actually write), and versatility (by which I mean the access Btrieve files, many things that I need to do are things that others may not ability to write part of the program when I want to). Each of these need to do. Accessing arbitrarily large variable length records may not be a products provides both in varying degrees. Each has its own strengths problem in developing an accounting application, but for me, handling a record and weaknesses. The one thing that they all have in common (and in of undetermined size is critical. Getting at physical location information is also important, as is being able to step through files in unusual ways. Many tools some cases the only thing they have in common) is that each is allow this, but most don’t make it as easy as it needs to be, or as easy as a designed to make the task of writing a Btrieve database application specialized wrapper around the standard Btrieve API can make it. easier and more efficient. When I started developing Btrieve applications for Posse, Inc., what In preparing this focus section, we submitted the same set of seems like a lifetime ago in 1986, the array of tools that we currently find around Btrieve development was unimaginable. And so, before crying about the questions to each of the various manufacturers represented here. Their difficult Btrieve tool selection decisions required in light of this embarrassment responses, which are summarized in the following articles, should of riches, remember how things were, and simply enjoy it. No one tool, not help you to determine which tool is right for your application. even the Btrieve Developer Kit, fits everyone. Happy shopping!

20 Btrieve Developer's Journal Winter 1995 TITAN FOR DELPHI Titan from Amisys is a replacement for the Borland Reports or InfoPower can also use the Titan engine to Database Engine (BDE or IDAPI) used in Borland’s Delphi access Btrieve data. product. It allows the developer to use the Delphi data- In addition to support for the Delphi data-aware aware components to access Btrieve data files without components, Titan also supports direct access to Btrieve having to use the ODBC layer provided through the BDE. record data through objects. Data from these records can be Titan also supports third-party Delphi components like in virtually any user defined format as needed by the InfoPower from Woll2Woll Software. Roy Kingsley of Lynk developer. The maximum record size is the same as Software, Scottsdale, AZ, developer of ‘Corrective Action Btrieve’s, and there is no preset limit on the number of Tracking’ software for manufacturing and distribution fields per file. industries, says, “Titan has been instrumental in resolving Titan also supports raw access to Btrieve records reliability and performance concerns with Btrieve ODBC through a direct Btrieve API interface. This allows the alternatives. Using Titan, we have been able to integrate developer to use custom routines to manipulate data that our applications with other Btrieve based applications cannot be handled by the standard Delphi data-aware without a single hitch.” controls. Titan provides low level access to Btrieve through Titan uses Btrieve DDF files as its primary source for BTRWOBJ.INT, constants in BTRIEVE.INC and table and field information and supports Smithware’s DDF documentation from the Btrieve Developers Kit. Creation of extensions. The product provides translation for variable- new data files, chunk operations, extended operations, length memo fields through the Delphi DBMemo adding and dropping of indexes, and certain other Btrieve component. Titan also supports the DDF “Lvar” data type. database operations which do not fit neatly into the Delphi/ Titan uses the index structure found in the data file, not the IDAPI mold are currently supported only through this direct structure in the INDEX.DDF file. This ensures that the interface. indexes used match the data file. Titan uses Delphi TTable Titan supports Btrieve owner names for both read-only properties to specifying the current index. The index and restricted files. There are two levels of transaction selection can be changed at any time during the execution support in Titan. One level is provided through the Delphi of a program, while keeping the table positioned on the TDatabase component, which provides transaction methods. current record if desired. The product supports up to 119 The second level is through the Titan direct Btrieve key segments per file. Index management and selection is interface. In either case, the developer controls the provided through Delphi’s key management functions, and transaction and there is support for concurrent transactions. all Btrieve key types are supported. Because Titan replaces the IDAPI and only supports Titan supports the Delphi Master/Detail properties that Btrieve files. Other data sources like Paradox, and dBase allow two or more tables to be linked together based on cannot be concurrently accessed through Titan. In addition, common key values. Titan also supports Delphi record Titan is not yet a complete functional replacement for filtering, allowing subsets of records to be displayed and IDAPI, some functionality such as the TQuery and DBBlob manipulated. components and the DbiCreateTable are not currently The program allows developers to use other Delphi supported. visual development tools such as the Database Form Expert, Titan currently requires DDF files to be distributed with Field Editor, and Master/Detail relationship editor. the developer’s application. For most people, this is not a Additionally, Titan provides management of multiple sets of problem. However, for some this presents a security risk. DDF’s through the Delphi TDatabase component. Any To address this, Titan will be enhanced to encapsulate Delphi third-party or shareware components like Quick required DDF information into the application’s EXE file. Planned enhancements include support for Borland Delphi 2.0 32-bit version, and support for Btrieve version Winter 1995 Btrieve Developer's Journal 21 TitanSQL to support Btrieve Technologies Scalable SQL both data files and DDF files. Transaction commits and through the Delphi TQuery, and TStoredProc components, rollbacks are controlled by the programmer, and both allowing the developer to use Delphi data-aware controls exclusive and concurrent transactions are supported. with BTI’s relational database product. TitanSQL will allow Added features include a SQL-syntax interface to the developers to join Delphi TTable and TQuery components Btrieve extended operations. SELECT statements are to create complex views of Btrieve data. supported with the keywords DISTINCT, AND, OR, and LIKE, and the operators “>” (greater than), “>=” ATA ONTROL FOR TRIEVE (greater than or equal), “<“ (less than), “<=” (less than D C B or equal), and “<>” (not equal). Case insensitive Classic Software’s Data Control for Btrieve is designed comparison can be specified as a property value for string to be a high performance OCX data control for Btrieve, to comparisons. The product also allows the developer to be used with Microsoft Visual Basic or other tools which perform extended insert operations. support OCX to create Btrieve applications for Windows The product is meant to complement the Btrieve 3.1, Windows 95, Windows NT. Like the standard data Developer Kit interfaces. It is an add on tool that provides control you can bind other controls to it and build an easy to use visual programming interface. It also adds applications with little or no code. Through a many value added features like an SQL interface to the comprehensive set of properties and methods you get access Btrieve Extended operations. It transparently coerces to the database capabilities specific to the Btrieve database Btrieve data types into OLE equivalents. The Data Control engine. for Btrieve also comes with Classic’s standard edition DDF Data Control for Btrieve is designed as a general Maker software for creating and editing DDF files. purpose tool for Btrieve development. The product is Both 32 bit and 16 bit versions of Classic’s Data targeted primarily to Visual Basic programmers who want Control for Btrieve are available. higher performance access to Btrieve without sacrificing the ease of programming offered by the standard Data control. The feature set of the product ranges from simple to the RASQL/B BTRIEVE RDD FOR more complex. At the simplest level applications can be LIPPER written in Visual Basic using little or no code by taking C advantage of the data binding interface which is identical to Communication Horizons’ RaSQL/B Btrieve RDD for the standard Microsoft data control. At the more complex Clipper is a replaceable database driver (RDD) for the end the product can be configured through properties to Computer Associates Clipper database development system. support many features specific to Btrieve. A comprehensive The product name can be a little misleading. RaSQL/B is set of methods gives the user access to the features specific not technically an SQL interface. Instead, it encapsulates to the Btrieve database engine. the Btrieve API in standard Clipper commands and Like most Btrieve database application tools, this one functions, the same ones used by Clipper to access xBase requires that databases be defined in DDF files. It does (DBF) files: Use, Seek, Skip, Goto, etc. Because RaSQL/B allow a user to make use of owner name security and is implemented as an RDD, it is well suited to a programmer encryption of their DDF files. In the near future a DDF will who is familiar with the widely used xBase syntax. This only be required at design time. Because DDF files suffer includes many people who are fairly new to programming. from some limitations on data structure, future versions will RaSQL/B also provides many additional Btrieve-oriented allow for an Object data format (ODF) so that more complex functions for “power users” who want to fine-tune their data types can be defined. The current product supports text applications. For example, these “power features” allow memo fields in variable-length records, as well as User- programmers to select page sizes, pre-allocation, and file defined Types and OLE data types. and index flags when creating new data files. All DDF field data types except for bit fields are The RaSQL/B Clipper version supports CA-Clipper supported in table definitions. A user can also gain access versions Summer-87 through 5.3. Under the Summer-87 to raw record data as a byte stream if need be, using version it is implemented as a function library rather than as methods similar to those used in Visual Basic to read files. an RDD. A 32-bit version of the product is planned for the Methods are provided to seek, read and write a record as a first quarter of 1996. byte stream. This provides the ability to store user defined The product is designed to appeal to developers who data (normally found in files) into data records. have mission-critical, DBF-based, Clipper applications who The record length maximums are those set by Btrieve - want to take advantage of the client-server features of chunk operation support for huge records is provided in Btrieve, and to users of Btrieve-based applications (such as Btrieve version 6.15 environments. The maximum number Platinum or Great Plains accounting programs) who want to of fields per table under Windows 3.1 is 1365 or the limit of provide customized enhancements such as data entry available memory. Under Win32 the limit is only set by screens, queries, and reports to those applications, using available memory. Clipper as a front-end. RaSQL/B also allows developers of The product supports segmented indexes, manual and DBF-based Clipper applications to add Btrieve client-server null keys, and the full 119 key segments per file, as well as benefits to their application without having to re-code using Btrieve index management operations of adding and SQL. Bill Mellen with the Ferguson Group described dropping indexes. Btrieve owner names are supported on RaSQL/B as “Utterly reliable for accessing our Great Plains 22 Btrieve Developer's Journal Winter 1995 accounting system. [RaSQL/B] gives performance and simple xBase Create From command, to a complex, Btrieve- navigation we can’t get from ODBC.” Since RaSQL/B oriented Make Table function. If the program uses the bypasses ODBC, it is well suited for high-volume, Create From command, RaSQL/B automatically decides transaction-based applications where performance and how data types are translated for index fields. If the database navigation are critical. program uses the Make Table function then it has complete Developers can use RaSQL/B to create applications that control over what data types are used. access Btrieve files in several environments, including DOS Communication Horizons also has a version of RaSQL/ programs, Clipper protected (extended) mode programs, and B for FoxPro. The FoxPro version supports FoxPro DOS Windows programs using Clipper with FiveWin or 2.0 through 2.6 and FoxPro Windows 2.6. Both support Clip4Win. Windows application development is supported Btrieve 5.x and 6.x, DOS and Windows. only under Clipper version 5.x. It can be used to port ATA LEX FOR TRIEVE existing Clipper applications to client-server Btrieve, or to D F B customize existing Btrieve-based applications using Clipper DataFlex from Data Access Corp. is a total application as a front-end. There is no royalty for distributing development environment for both Client/Server and executable programs compiled using the product. traditional computing in DOS, OS/2, and Windows. Since RaSQL/B is implemented as a replaceable data DataFlex combines an object-oriented fourth generation driver for Clipper, the program can have Btrieve files and language (4GL), a visual application generator, a native standard xBase DBF files open in the same program. For relational database management system and a set of built-in example, the following code is permissible: tools and utilities. DataFlex supports client-server architectures by using different dedicated or ODBC drivers select 1 to communicate with a variety of servers. use dbase.dbf // open DBF file select 2 DataFlex is designed for the professional application use btrieve.dta via “rqbrdd” // open Btrieve file set relation to dbase->key_field // set relation from Btrieve to DBF developer who is designing retail or custom software for a // Btrieve to DBF relations are also permitted wide variety of business applications. A reasonable proficiency is required to use the language to its highest RaSQL/B can read DDF files, though these are advantage. Less technically proficient designers can create optional, and supports all Btrieve data types, as well as 6- object oriented database applications, however, by byte Pascal floating-point fields. RaSQL/B also supports following the instructions in the DataFlex framework. dynamic variant record structures, the commonly used DataFlex for Btrieve is an enhanced version of technique of defining records which have different field DataFlex that supports access to Btrieve Technologies’ structures within single data file. RaSQL/B supports variant Btrieve files. DataFlex for Btrieve can access data stored in record structures dynamically - it is not necessary to close other Btrieve applications directly. No additional and reopen the file to change the definition. Variable length middleware is required to access the data. DataFlex for records may contain either text (note) fields or binary data. Btrieve is typically used to create business applications RaSQL/B allows in-line control over how records are requiring a client/server solution in a LAN-based defined. For example, if the record contains ten fields for a environment. It is particularly well-suited to high-volume, total of 200 bytes, the program can define it as a single, multi-user transaction processing situations. character-field of length 200. The program can parse the “Household Mortgage Services, a division of resulting buffer in any way it chooses. The maximum Household Internation, Inc. has never regretted their supported record length is 64K bytes, and there is no preset decision to move their large 400-user system form a Wang maximum number of fields per record. emulator to DataFlex running on a PC-LAN, and their Btrieve extended fetch operations are supported in recent migration to a DataFlex for Btrieve client/server RaSQL/B through an enhanced version of the standard solution has further strengthened the reliability of the xBase command Set Filter, which performs server-based system. Household is a large user of the DataFlex-based filtering when used in a Btrieve client/server system. The application Mortgageflex, which they use to process one of syntax of the enhanced command is Set Server Filter. Note the country’s largest home lending programs,” said Brad the differences in the following example: Waddell, president of FLEXQuarters. A list of important features supplied by Data Access use client.dta via “rqbrdd” // open Btrieve file set filter to state = “TX” // filtering performed by workstation Corp. for DataFlex includes transaction logging to increase set server filter to state = “TX” // filtering performed by server system reliability, transaction processing for improved data integrity, tunable system parameters optimizing system Similarly, Index selection is handled using the standard performance, and user password protection for data xBase Set Order To command. The product supports the security. DataFlex uses a record oriented command syntax Btrieve maximum 119 index segments per file, and supports (find, save, delete, etc.) to support Btrieve data. The the use of segmented, manual, and null keys. New product supports segmented indexes, manual and null keys, supplemental indexes can be added to a file using the xBase and Btrieve owner name security. DataFlex also has support Index On command. in the language for programmer control of transaction Btrieve owner name security is also supported, as are processing (commit and rollback) implemented as exclusive and concurrent transactions. The developer has a transaction commands. DataFlex also includes file locking wide variety of methods for creating new data files. From a and record locking features implemented internally, auto numbering of records if required (for unique keys), access Winter 1995 Btrieve Developer's Journal 23 translation, nor does the product take advantage of Btrieve file. chunk operations support for huge records or Btrieve Magic currently does not support ODBC data sources, extended fetch operations for client/server record retrieval. but ODBC support is planned for next version. Current Win32s, Windows NT, or Windows 95 support, 32-bit RDBMS support is available via an internal SQL generation versions of DataFlex are currently available. facility or through ANSI embedded SQL. For non-SQL databases such as Btrieve, Magic modules handle the AGIC VERSION translation of implicit database requests and Magic- M 6 generated SQL commands to explicit function calls to the Magic version 6 from Magic Software Enterprises is a RDBMS. second generation rapid application development (RAD) The product supports all Btrieve index types, and will tool which brings a totally table-driven approach to client utilize up to the Btrieve maximum of 119 index segments and server development. In Magic, complete application per file. Magic applications can take advantage of Btrieve functionality, including data structures, business rules, owner name security both for data files and program program logic, and presentation — is developed entirely in a dictionaries. Transaction commit and rollback are also table-driven programming environment. The company cites under programmer control. Btrieve extended operations and evidence of consecutive victories in the Droege huge record chunk operations are not currently supported, development competitions, among others, to support their but support is planned for the next version. Full featured claim that this design makes Magic the fastest way to version control is also planned for versions to be released in develop highly complex strategic applications. The the coming year to make Magic more useable in a team company claims over 50,000 development and 340,000 development setting. 32-bit support is planned for release in deployment units sold to date. Customers include corporate the second quarter of 1996. IS system staff, consultants, VARs, system integrators, independent developers and packaged software publishers. Companies include Rolls Royce, Gannett, NEC, Samsung, SMITHWARE CLASS LIBRARY FOR the City of Milwaukee, Club Med, and Bell Quebec. Magic TRIEVE applications are portable to a wide range of platforms and B databases, including Windows, Novell NetWare, SCO, IBM Smithware Class Library for Btrieve is a set of C++ AIX RS6000, Sun, H-P, Data General, AT&T, Olivetti, component classes which encapsulate the functionality of Siemens, Digital VMS, Digital ALPHA, IBM AS/400, the Btrieve API for object oriented programming. It is Unisys, Fujitsu, Ticom, and NEC. designed to supplement the Btrieve Developer’s Kit, to give The product is designed to facilitate the development of C++ programmers a record operation object interface to complex and data-intensive applications as well as any Btrieve, and to handle common database tasks such as strategic application that must be developed in a relatively buffer allocation and maintenance, data dictionary access, short time frame within a fixed budget or on a wide range of and data translation. The Smithware Class Library for platforms. Napco, a worldwide distributor of US military Btrieve requires that the developer have the correct Btrieve spare parts, is now using Magic to manage its inventory. Developer Kit for his target platform. During an 18-month period, Napco downsized from an IBM It ships with complete source code so that developers mainframe to a Novell NetWare LAN supporting 100 DOS can customize classes or port the library to compilers or and Windows based PCs, and a Tricord Powerframe environments not specifically supported by the pre-compiled superserver with 16GB of hard disk space, running Btrieve object modules. Supported environments include DOS and for NetWare. Magic was chosen to implement this Windows, with pre-compiled libraries for Microsoft and downsizing effort. Randy Gutman, a Napco Systems Analyst Borland C++. Portable source code and 32-bit libraries for said, “We have developed more than 600 programs using building Visual C++ applications using Btrieve for Win- Magic. One of these deals with more than 60 files at the dows NT/Windows 95 are scheduled to begin shipping in same time to generate a report on a single part number. In late January. all, there are 300 relational tables in the Magic database Class Library for Btrieve does not require DDF files, taking up over 3GB of disk space. This includes one file but the library does include objects for reading, using, and that has over 1.5 million records and is almost 1GB.” maintaining DDF table definitions from within your applica- There are a few Btrieve and DDF data types not tion code. The product includes data field translation currently supported by Magic: the Note, Lvar, Bit, classes for all Btrieve and DDF data types and for data NumericSTS, and NumericSA. Magic does support a types defined in the Smithware DDF extensions. Class number of data types common in COBOL languages and on Library for Btrieve has no preset record size limit, and other database platforms, as well as a few date, time, and includes support for huge record chunk operations. Like- numeric types which it uses internally and in its default wise, there is no preset limit to the number of fields per file. storage formats. Magic uses its own dictionary format to The Class Library for Btrieve places a thin interface store database definitions (as well as everything else about layer between a developer’s application code and Btrieve, the application), but the product claims to be able to use so it does not affect the performance of the application. DDF information if it is available. Magic sets the maximum Most of its functionality involves handling chores normally record length at 4K for fixed-length records, 64K for coded by the application programmer and providing a variable-length records, and has a limit of 4090 fields per number of commonly used utility functions. It does not 24 Btrieve Developer's Journal Winter 1995 implement any sort of relational database functionality, SQL dates and times, and binary variations. Additionally, the syntax, or ODBC interface. Since the product is designed as raw record buffer data is available to the developer as a a class wrapper for Btrieve, it supports all index types, property for use with user-defined Type variables or for owner name security, transaction commit and rollback, and translating other data formats. There is no preset maximum discreet database functions. Its extended operations support record size and no preset maximum number of fields per file classes provide simple methods for setting up Btrieve The product supports the Btrieve maximum of 119 key extended operations. Database functions which may take a segments per file, segmented, manual and null keys, and number of different options, such as file creation, adding other Btrieve index attributes. The product can use Btrieve and dropping of indexes, and extended operations, are owner name security with data files and DDFs, Btrieve implemented with overloaded functions so they will either transaction processing, and record locking. The product use options supplied by the programmer or use defaults. does not directly support chunk operations or adding and The Smithware Class Library for Btrieve assumes a dropping of indexes on existing files. fairly high level of technical proficiency. It assumes that Controls for Btrieve includes a control that implements the programmer has a thorough working knowledge of Btrieve’s extended operations. This control can accept a Btrieve, access to the Btrieve Programmer’s manual, and a filter condition string as a property, performing the same good understanding of C++ object-oriented programming function as an SQL SELECT statement with a WHERE concepts. It provides a native C++ interface to Btrieve, clause. The JOIN property of the controls serves to maintain substantial additional functionality, and the same degree of parent/child links between records in different tables which performance and flexibility as the Btrieve Developer Kit have related key values. interface for C++ programmers. The package includes sample code that demonstrates using features of Smithware VBX Controls for Btrieve, and SMITHWARE VBX CONTROLS FOR BTRIEVE using both VBX and direct Btrieve API access in the same application. The included Extended Operations Control is a Smithware VBX Controls for Btrieve is for the software convenient way to interface third party “grid” or developer who wants to build a Visual Basic application that “spreadsheet” controls with Btrieve, using the fastest client/ accesses Btrieve files. Smithware VBX Controls for Btrieve server capabilities of Btrieve. The package also includes works in a fashion similar to the Microsoft data control DDF Builder, the industry standard for defining and included with Visual Basic, but is designed specifically to maintaining Btrieve databases. address all features of Btrieve. The product shields the developer from the details of interfacing directly with the Btrieve API, and delivers its functionality via properties and DBFTRIEVE methods. It is particularly easy to access Btrieve data using DBFtrieve, from SofTech Microsystems Inc., is targeted Btrieve’s extended operations for fast and efficient client/ for developers who want to use a non-SQL approach to server applications. The product interfaces directly with the accessing Btrieve files from within their development Btrieve API and does not require the overhead of an ODBC language. Developers need to understand how to make interface. function calls from the host language, as well as the record Controls for Btrieve is designed to be a general purpose layouts for the file(s) of interest. Many developers use the tool for programming Btrieve applications with Visual product to access data from Btrieve based accounting Basic. Several levels of functionality and complexity can be packages such as Platinum, Macola, or Great Plains, and to achieved while developing applications, from simple, no- design custom xBASE screens and reports for these code file browser applications to completely integrated packages. client/server applications. The product requires a good DBFtrieve provides a Btrieve interface for users of understanding of the techniques of Visual Basic compilers or languages for which an interface is not programming. provided as part of the Btrieve Developer’s Kit. In Controls for Btrieve supports Visual Basic version 3 or addition, a high-level function layer is provided that allows version 4 (16 bit). The product is also compatible with other users of these products to access Btrieve with a syntax 16 bit development environments that support VBX similar to that used by xBASE languages. Languages controls. It has been tested with Visual Basic versions 3 and supported include FoxPro version 2.0 through Visual 4 and Visual C++ version 1.5. Since the VBX format is Foxpro, CA-Clipper, CA-Visual Objects, and dBASE for strictly a 16-bit architecture, Smithware is currently Windows. converting the code from a VBX to an OLE object control The product does not require DDF definitions, but they (OCX) implementation. The company plans to release the can be used to define tables. DBFtrieve supports all Btrieve OCX version in early 1996. data types as well as text and binary data in variable length Controls for Btrieve requires DDF files. These may be records, and also supports the 48-bit Borland Pascal Real, created using DDF Builder for Windows, which is included. and 80-bit IEEE floating point types. Access to record data It supports all Btrieve data types, and naturally supports includes raw record data, data converted via DDF definition Smithware DDF extensions which define data types or data converted via an explicit call to a conversion commonly found in Btrieve data files but not definable function. There is no preset maximum record size or number using standard DDF: Magic data types, TAS data types, of fields per record. Pascal 6-byte real, additional COBOL data types, various DBFtrieve supports all Btrieve key types, file creation, adding and dropping of indexes, and transaction processing. Winter 1995 Btrieve Developer's Journal 25 task of creating different applications with a common look The product is ODBC Level 1 compliant, and the and feel which access the same database. Corporate/MIS “Import Table” procedure makes ODBC level 2 calls where Developers can also use Clarion to create applications for applicable. The product supports all SQL keywords and accessing enterprise data from a mainframe or server. syntax supported by the underlying database, which in the Application performance and system requirements tend to be case of Btrieve is (presumably) none. Clarion implements its the major considerations for such users. Clarion creates a own grammar for database operations. It claims support for compiled application, and reports are compiled into the all Btrieve index types, creating new database files, and executable. TopSpeed estimates that the typical application adding and dropping indexes. footprint is about 1.5MB, versus 4 to 8 MB for competitive A typical use for a Clarion for Windows application RAD products which require a separate database engine and would be to store a database description in the database runtime or .VBX for reports and that performance is dictionary, storing the business and application logic there. improved. If, for example, the database consisted of twenty tables, and TopSpeed lists the features which make Clarion well the typical application for maintaining and reporting the suited for data-driven applications as: the Calrion database database referenced five of those tables, the developer dictionary, which stores database descriptions, business would run the Application Wizard, select the five tables, rules, and application logic; the Clarion language, which generate, and compile an application. has an integrated database grammar; and the Application The resulting application can contain threaded Wizard, which aids in the creation of applications for “browses” with separate record buffers for each table, and maintaining multiple tables. Another plus is Clarion's an update form that appears whenever an end user presses a ability to compile either a 16 or 32 bit Windows executable button to insert or change a record. For any parent-child from a single development environment, using a single relation, a tab appears behind the update form, on which the project file. The finished native executables share a end user can view a list box containing any child records. common look and feel — Clarion for Windows clones Clarion automatically manages relational integrity and Windows 95 controls, such as the tree control, progress generates columnar reports for each table. Should the controls, etc., backwards to Windows 3.1. It also brings 16- developer wish to change the resulting applications, visual bit VBX controls forwards to Win32. design tools and the 4GL Clarion language make this Clarion does not require DDF’s, as it has its own data possible. ² dictionary capabilities, but it can use DDF’s when defining A 32-bit version of the product is currently available. Btrieve data sources. Clarion supports all of the Btrieve Planned enhancements include ad-hoc report writer, which field types, and has support for Btrieve variable length is currently under development. records. Clarion limits the size of individual records to 64K in Windows 3.1, and the Clarion product itself has no inherent size limitation for individual records in Windows 95 and Windows NT. Transaction Commit and Roll-back can be implemented automatically or manually in code.

Btrieve Development Tools Roundup - Contact Information

AmiSys Incorporated Btrieve Technologies, Inc. Classic Software, Inc. 1390 Willow Pass Road, Suite 930 8834 Capital of Texas Highway N 900 Victors Way, Suite 170E Concord, CA 94520 Austin, TX 78759 Ann Arbor, MI 48108 Phone: 510.671.2103 Phone: 800.287.4383/512.794.1719 Phone: 800.677.2952 / FAX: 510.671.2104 FAX: 512.794.1778 313.913.8075 Email: [email protected] Email: [email protected] Fax: 313.913.4087 http://www.reggatta.com http://www.btrieve.com Email: [email protected] Communication Horizons Data Access Corp. Magic Software Enterprises, Inc. 65 High Ridge Road, Suite 428 14000 Southwest 119th Ave. 1200 Main Street Stamford, CT 06905 Miami, FL 33186 Irvine, California 92714 Phone: 800.480.1604/203.324.0448 Phone: 305.238.0012 Phone: 800.345.6244 or 714.250.1718 Fax: 203.324.2323 FAX: 305.238.0017 Fax: 714.250.7404 E-mail: [email protected] http://www.daccess.com http://www.netlib.com http://www.magic-sw.com Smithware, Inc. SofTech Microsystems Inc. TopSpeed Corporation 2416 Hillsboro Road, Suite 201 PO Box 12582 150 East Sample Road Nashville, TN 37212 Wichita, KS 67277 Pompano Beach, FL 33064 Phone: 800.8.Btrieve /615.386.3100 Phone: 800.803.7215/ Phone: 954-785-4555 FAX: 615.386.3135 Fax: 954-946-1650 Email: [email protected] 316.729.9315 http://www.smithware.com FAX: 316.729.1649 http://www.topspeed.com Email: [email protected]

26 Btrieve Developer's Journal Winter 1995