HP3000-L Archives

October 1995, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Breemer <[log in to unmask]>
Reply To:
Chris Breemer <[log in to unmask]>
Date:
Wed, 4 Oct 1995 13:46:15 MET
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
Evan Rudderow wrote:
>
> Chris Breemer <[log in to unmask]> wrote:
>
> >Does anybody out there use the SQLX interface to Allbase ?
>
> <snip>
>
> What *is* the SQLX interface -- from the rest of your message I'm guessing
> that it's a Call Level Interface to Allbase?
>
 
HA !!!! Wish I knew ... :-)
 
Well seriously, I inherited the UNIFACE Allbase driver, which was written for
us in the past by a softwarehouse. The driver mainly uses embedded SQL, which
is clear to me, and partly calls to sqlx. Actually, each EXEC SQL statement
is translated by the preprocessor into a call to sqlx. But there is some
functionality in sqlx that you can't do with embedded sql. I found that out
after contacting the original author of the driver, who sent me the HP
document "SQLX Interface External Specifications", which is dated feb 19, 1992.
I don't know whether there is a later revision of this document.
 
The primary reason for using direct sqlx calls is the following. The driver
maintains a cache of prepared cursors for various select staments on various
tables. It is therefore necessary to activate a cursor by number rather than
esqlc hardcoded names. One way to get around this is to build huge constructs
like
 
        switch(icursor)
        {
                case 1: EXEC SQL FETCH CURSOR s1; break;
                case 2: EXEC SQL FETCH CURSOR s2; break;
 
                ...
        }
 
and this needs to be done for every possible operation on the cursor.
With sqlx you can associate a cursor with a temporary section, and use it
without going thru the above. This really save LOTS of code but I don't like it
all the same. I wished that esqlc would let you put cursornames into a host
variable, which would solve most of my problems. But this seems to be the
same in esqlc processors on other dbms'es.
 
The other reason for using sqlx is to set the automatic date/time conversion
mode, and the transaction autobegin feature. Sadly, this is not possible
(or it's not documented) with esql/c.
 
> How'd you get it?
>
I didn't. It is there (psqlc uses it). Just get the document mentioned, which
is not very good by the way. But it seems you need to use sqlx in some cases.
The sad thing is that the Allbase/SQL C programming guide does not have one
single word on this topic. HP Database labs any comments ?
 
--
 
:)
Chris Breemer
[log in to unmask]

ATOM RSS1 RSS2