Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.databases Subject: Re: c++ and SQL Message-ID: Date: 3 Jun 91 02:55:36 GMT Article-I.D.: uunet.CIMSHOP!DAVIDM.91Jun2195536 References: Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California Lines: 34 In-reply-to: av@kielo.uta.fi's message of 28 May 91 08:39:52 GMT >>>>> On 28 May 91 08:39:52 GMT, av@kielo.uta.fi (Arto V. Viitanen) said: Arto> A student needs a library for C++ (GNU C++) to connect to SQL database Arto> -- INGRES preferably, but ORACLE would do also -- for part of his Arto> master's thesis. So is there any PD library or otherwise ? Having gone through the process of trying to connect up C++ with an SQL preprocessor, I would recommend against attempting it unless you have an SQL preprocessor designed to work with C++. Instead, I have found that the much more reliable and portable method is to modularize your SQL calls into straight C functions so that you may use the standard SQL/C preprocessor on them and later link these with the rest of your C++ code. The other approach (SQL embedded in C++) will always be a hack to interface with the way one SQL preprocessor or C++ compiler works. #define SOAPBOX_MODE For this reason, I believe that the SQL standard should not specify a preprocessing standard on top of some other language, but rather a method of using SQL that does *not* require a change to the base language that it will be used with. If that were the standard, then any RDBMS with an SQL interface that works under (for instance) VAX/VMS would be able to interface with *all* the languages used on VMS. You would not need a special preprocessor for each language. #undef SOAPBOX_MODE -- ==================================================================== David Masterson Consilium, Inc. (415) 691-6311 640 Clyde Ct. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"