# Users' Comments

While it certainly doesn't have the visibility of Boost, I don't know
of any programmers using both databases and C++ who aren't at least
aware of OTL.

... is to get hold of the free and very excellent OTL (Oracle Template
Library) from sourceforge (I think) and check out the demos and
docs. It is C++, it is STL and it is bleeding fantastic.
All you need to do is #include <otl4.h> and that is it. You also get
the full source code as everything is defined in the *.h file. Not
only that, but it covers OCI7, OCI8, OCI9, DB2, ODBC etc as well - at
no extra cost.
These Russian programmers are some of the best I've seen !!!

> The [other] area bothers me is database access layer. All these
> database vendors promote JDBC because there is no standard C++
For the equivalent of JDBC, there's always the OTL.

I have implemented your OTL library in one of the programs I wrote replacing the OO4O interface. I have noticed a major performance increase.

I've been very impressed with the performance of OTL, comparing it with our 4GL programs. The ability to have the performance gains from low-level OCI calls without having to actually *do* the low-level OCI calls is a great combination!

I received OTL and have since then been experimenting a lot with it. Starting with your sample application, we soon developped a performance test for db access with Pro*C vs OTL/OCI8. It turned out that with embedded SQL OTL is significantly superior to Pro*C as for our requirements. At this point I would like to send you thanks and congratulations for your work of a real expert!

I just found the time to take the first steps with your OTL and what should I say? I only needed a few minutes to get a test application to run! Very impressive!

The next steps I tried were some performance tests, so I played around with the arr_size parameter. My test application with OTL runs about 8 times faster than the raw version which I have written with direct OCI calls. Again: Very impressive!! Many thanks for your excellent work!

Thanks for the help. OTL was a big success in our benchmarks. Looks like Java 1.1.x is pretty severely crippled when it comes to performing on large multi-processor machines. C++/OTL isn't.

Thanks Sergei...I am absolutely amazed at what you have done in one header file. It really blows my mind.

This is the coolest stuff I've ever seen for Oracle open/source! I'd appreciate your effort..

It seems that I have finaly convinced the others, that Pro*C Suxx and OTL Rulez. I just gave them the OTL-Version I used some months ago and when having a look at my links I read, that theres a new version. Could you tell me how to do this ? Well I think you have been told thousands of times how great your work is, but I think I'll do it again.

OTL is great! Thank you for writing it!
With Finest Regards for your most excellent work!

You might be interested in OTL see "Oracle and Odbc Template Library Programmer's Guide." I use it to access Oracle in TAO servers written in C++ (on unix byut OTL will work with anything)

For Oracle database _anything_ - when speed is important, or large recordsets are being used - ODBC and DAO are crap. They gobble up memory, and run incredibly slow. You didn't mention the version of Oracle, but I've tested the following with v7.2 & 7.3 running on UNIX servers, and WinNT Servers (and of course the GUI clients). I highly suggest a freeware class by Sergei Kuchin. An excellent utility wrapper to the OCI API. It's called OTL ( Oracle Template Library )...It will end MANY headaches & long waits for huge queries. Of course, your still limited by your server, but that's a whole different game.

Hi Sergei

I hope I'm not bothering you. I have just discovered your OTL code. I replaced a ton of Oracle PRO/C code with it and I am very impressed. I've increased in performance and descreased the code I need to write. As well, no repetitive code EXEC DECLARE etc. My question is:

I need to use the BLOB data type, and I was wondering if you could describe briefly what I need to do to add that functionally. I assume I will need to:

create a type :f1<blob[size]>

create the << >> operators.

What else should I know before I dive in.

Thanks for any help and once again, nice job.

As I said, I work quite a bit with Perl so I get lazy. It does everything for me. When I want to do something, I just want to call a function. I really don't care to know how it works. I like appliances. That's why I like what you have written. It lets me do what I need to do without making me think about too much. Plus the tech support has proven to be significantly better than I would get from Oracle.

Thanks for the advice on the extra variables. I'll give what you suggest a try.

Hi Sergei,

Yea, that was me with the NULLs. I got caught being a lazy on that one.I tried what you suggested for the ref cursors and it it worked, smooth as silk. Thanks a million.

Even the tough guy programers who like to massage each bit by hand are impressed. I had spent some time looking at example 4, but always left in the fetch loop. I guess it never occurred to me that things could be so easy (meaning well implemented).

I am extremely interested in the next version of OTL. Let me know when its ready.

Again, thanks for the prompt help.

As I said before, I think you have filled a big void in the C++/Oracle relationship, and I have found OTL to be an extremely useful tool. I have developed apps under MSVC++ 5.0 on NT and gcc (glibc) on Linux and AIX boxes for Oracle 8.0.5.

We have been working with the Oracle Pro*C Precompiler for some time and have experienced some trouble in using ORACLE nder DIGTAL UNIX with multithreaded C++ programs. The input- and output-code having to be used when using threads and classes is so bad, that we do not want to present our buisness partners a program based on this code. The ORACLE support told us something like "A C++ parser is not going to be implemented in the future", so we began looking for an alternative and we seemed to have found one : OTL. I just had one look at the sourcecode and I must say that using the OTL is sort of fun. In contrast the Pro*C was sort of a pain in the neck, whith tons of workarounds and sometimes having to spend weeks for solving a simple problem. My question now is : Has anyone been able to make some experience with the OTL ? Does it realy work, even with more complicated SQL-commands ? Is it realy threadsafe ? Is there any more detailed information about it and are there any known bugs and problems ? I would appeciate any comments.

I've tinkered some with the following:

Try the OTL (Oracle call interface Template library) by Sergei Kuchin, http://home.sprynet.com/~skuchin/otl_1pg.htm. Thin wrapper over OCI, easy to use and high performance.

Its pretty slick C++ action that returns data from oracle as a stream.

First, thanks a lot for replying that fast on my Oracle8 question.

It worked like charm !

I'm running on a linux machine, with oracle installed on it.

Good to know OTL has an responsive address :)

More power to you. I think you really have a very good & flexible framework, especially if you have an ODBC implementation. I wish you the best of luck.

Obviously when your apps use odbc, pro*c or OCI (have a look at OTL, the oracle template library for a nice freeware oci-wrapper btw) the oracle/pl/sql part isn't hard. C/C++ won't be a problem either (try GCC, MS-VC++, Borland/Inprise C++, ZortechC++ etc), especially when your programs are ansi-compiliant. I don't thing the posix "emulator"/subsystem will be of much help if your apps wander away from "hello world" too much...

I am doing some test with the OCI OTL V2.0.0. My question is : do you also have somewhere calls concerning Oracle-pipes. Congratulation on the OTL by the way.

I was very impressed by your OTL implementation! I wonder about one thing: Does it support Date data type ?

Hello,

thanks for your OTL , and it's great for STL programmers, but do you have (or where can found) a NO-TEMPLATE version?

Dear Mr. Kuchin

I'm a happy OTL user.

When using the 'otl_out_stream::operator<<(const char* s)' with buffer that...

Thnx again, exelent library!

I have found OTL to be a great class library, it's really easy to use. Thanks for giving it for free.I have several questions however, which concerns my use of OTL (OCI 8 version) in a program.

Thank you very much for your help! It is really appreciated. The OTL library seems like a very interesting approach. It definitely seems to offer a better alternative to what we had.

Thanks again!

I just downloaded your freeware OCI class library and built an test application with it on Solaris - Seems to work great!! We have a lot of code built with Oracle PRO*C/C++ which I would like to stay away from for anything we do in the future.

Took a look at your home page - Do you still work for AiC? I have been working for them in Atlanta since December '95.

I was just wondering if you had any sort of general performance comparisons between your amazing looking OTL and actually using Oracle's OCI. Obviously OTL is MILES ahead with respect to development time, but I was curious as to whether there are any notable performance decreases when utilizing OTL vs. OCI. If you have any of this information, I would bemost interested! After studying Oracle's OCI, OTL looks like a God-send at this point!

Much thanks!

Firstly, may I thank you for donating your OTL code to the public domain. It is a really nice piece of work. Having looked through the code and examples provided, I have a number of questions which I hope you may be able to answer.

And I appreciate the work. I think you have a good thing here. Making a product like this available is quite generous! THANKS!!

I recently had to code an oracle pipes based interface to the computation-server system I'm working on. Pro*C wasn't flexible enough, because I need to do dynamic SQL and using DBMS_SQL seemed like a bad idea. Besides, it doesn't sit too well with C++, and handling the array inserts I needed to do was going to be a pain. I haven't coded in OCI before, and though I've read the manuals I knew it was going to take me a while for me to feel comfortable. Besides, passing all those 0's everywhere,,, uggh. It needed wrapping, and I didn't have the time.

So I hunted on the net... and found your stuff... and it was good... and made my life easier, which I always enjoy. Thanks very much, especially for putting it in the public domain. I don't know how you get the time to do this sort of thing outside work. I've wondered about coding a streams-based interface myself - I like your ideas and your code.

Thank you for your reply. I have used your SQL class library in the past and think it's great. I reviewed the OTL document and think it will be an even better tool. The code looks very clean and the examples are very helpful. I did not see specific reference to LOB support though. Did I overlook something in the document?

Thank you so much for your OTL class library; it will be of immense help to me!

Thanks for the fantastic coding tip! I modified my ocicdr program as you suggested below, and used the otl_stream.open() to describe the insert statement, instead of in the contructor, and WOW!!! I got a performance increase by a factor of 400%. Here's what I got:...

Thanks for your effort! I want say "I love your OTL!"...

Thank you, again

i work with your very comfortable Otl -Class Library. The new version V2.0 is 10-20% faster than the older one 1.0.65. My favorite is the ref cursor because we can manage the memory in the host program with it dynamically. The fastest way in my applications is an stl vector.

First, I wanted to thank you for your generousity for posting a much needed C++ interface for Oracle OCI. There isn't much out there, and my serach brought me to your website. Your impliementation of the C++ OCI wrapper looks very slick, and I can wait to use it with my project!

I found your work in a web search. This is extremely interesting and creative. Are there versions for other database servers? ODBC? Have other people said they would create other versions?

Very impressive piece of software.

I've been looking through your very extensive library in otl.htm for the past couple hours now. It is very impressive and looks like you have spent a VERY long time putting it together. I hope you do get a contract for it picked up by a distributor. My pitiful little 'simulation' of...

A while back, I was looking at using Oracle for a project I am involved with, and I came across your OTL library. I never actually tried it, but I liked very much the approach demonstrated in the docs that I read.

We use Sergei's OTL C++ library and have found it to be at least 2x faster than Pro*C. More speed is realized when using SQL*NET. Bottom line is that OTL is easier to use than native OCI and is faster than Pro*C.

Thank you million times! You are a genius! It is really nice piece of work, with very good concept. I think that's what I'm looking for, and I will try to set up this to work right away!

>This OTL looks great for console applications. Does anyone know if there is one for windows based applications, or even better one that is based with MFC?

As far as I know, OTL can be plugged in where ever OCI is supported. Because you can inline the entire library, you should be able to plug it in to any development environment. This is an advantage of using C++ templates -- it allows for more portable code. I may be all wet about this, but I think you'll be able to use it for any type of application, not just console ones.

Use the C++ OTL (Oracle Template Library). It's faster than Pro*C, easier to use than OCI, and because it is an in-line library, you don't have to compile a shared-object library (aka DLL in NT). You can compile it into a library, but you really only have to #include thef ile. Best of all, it's distributed free of charge.

We use it in our production system with no problems. Check out http://home.sprynet.com/~skuchin/otl_1pg.htm

If you want to do it in C++ the have a look at http://home.sprynet.com/~skuchin/otl_1pg.htm
I use this OTL (OCI Template Library) from within MSVC 5.0 for connecting Ora7.3 and it works great.
It is based on OCI from Oracle.

We started using your OTL library a couple of weeks ago for our current project. We are trying to do multithreading, but our old library wasn't really thread-safe. OTL has performed remarkably well in the multithreaded environment. Our hats off to you for this great piece of open source software.

I must also thank you, this API allows for much smoother development and compiling than the Pro*C/C++ Precompiler.

Congratulations on the OTL concept

Go Home

Copyright © 1996, 2007, Sergei Kuchin, email: skuchin@ispwest.com, skuchin@gmail.com.

Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies.