Re: OCI Q

From: <sstephen_at_us.oracle.com>
Date: 22 Jul 93 05:36:15 GMT
Message-ID: <1993Jul21.213615.1_at_us.oracle.com>


In article <21f4i7$o6d_at_transfer.stratus.com>, hship_at_sw.stratus.com (Howard Ship) writes:
> Having found the pre-processor too limiting, I've moved onto the OCI. I'm on
> a sun 4, running Oracle 6.
>
> Here's some code ...
>
> typedef struct {
> short v2rc; /* v2 return code */
> unsigned char fill1[10];
> unsigned short rc; /* return code */
> unsigned char fill2[19];
> unsigned char ose[4]; /* OS dependent error code */
> unsigned char chk; /* check byte */
> unsigned char sysparm[26]; /* private, system parameters */
> } Ldadef;
>
> typedef char Hdadef[256];
>
>
> int
> orlon (Ldadef *, char *, char *, int, char *, int, int);
>
> #define sqlLogon(lda, hda, userId) \
> orlon (lda, hda, userId, -1, (char *) -1, -1, 0)

My guess is that you should have put "(char *) 0" for the password. And I quote : "A pointer to a string containing the password. If the password is specified as part of the string pointed to by uid, this parameter should be passed as 0." -- ORACLE CAll Interfaces Programmer's Guide Version 7.0

>

... lots of bandwidth being saved ...  

> Any clues or tips here? Did anyone notice how evil Oracle is (trying to put a
> 32-bit integer on an odd byte boundary in the ldadef? "every byte is sacred.
>.."
> --
> "Rice Chex!! Wheat Chex!! Rice Chex!! Wheat Chex!!"
> Howard_Ship_at_vos.stratus.com

-- 
================================================================================
Scott Stephens				inet:	sstephen.us.oracle.com
Oracle WorldWide Support                Redwood City, California
Received on Thu Jul 22 1993 - 07:36:15 CEST

Original text of this message