[comp.sys.mac.hypercard] ORACLE/HC 2.0

rgoldstone@OAVAX.CSUCHICO.EDU (Robin Goldstone) (11/29/90)

At the request of Kevin from Apple, I am posting this message to describe
my problems/solutions of getting an Oracle/Hypercard application working with
HC 2.0.  
-------
A couple of days ago I posted a problem I was having with a stack that I had
just converted to HC 2.0.  The stack is used to access an Oracle database.
It is a stack I wrote - *not* an Oracle-supplied stack.  The first card has
a button called "Log On" which attempts to log the user onto the Oracle
database.  If an error message indicates that the database has not yet been
started up, the script starts up the database then re-attempts the user logon.
The two commands to start the Oracle database are:
   send "loadOracle" to ":Oracle:System Stack"
   send "startOracle" to ":Oracle:System Stack"
These commands "broke" when I converted the stack to HC 2.0.  With help from
the net, I fixed them as follows:
   send "loadOracle" to stack ":Oracle:System Stack"
   send "startOracle" to stack ":Oracle:System Stack"
This change was necessary due to HC 2.0's extended capabilities to "send" 
messages to lots of different object types.  

This change fixed my "Can't understand this" error message, but the script
still did not work properly.  During execution of the script, I would get
just a single "beep" and the script would stop some time around the first
"send" command.  Weirdness #1: if I immediately re-executed the script it
would work!  Always it would fail the first time then work the second time.

I started checking it out with the debugger.  Weirdness #2: if I step through
the script using "Step Into" it would work the first time!  Using "Step Into" 
I found that the send "loadOracle"... command resulted in the following:
execprog "kernload.ld".  The send "startOracle"... command resulted in the
following: execprog "ior.ld","warm pfile=%ORA_DBS%:init.ora".  "execprog" is
an XCMD included with Oracle.  It lives in Oracle's System Stack.

The misery ended when I moved Oracle's XCMDs "execsql" and "execprog" out of
Oracle's System Stack and into HC's Home stack.  My logon script then worked
on the first try.  If I try to copy the XCMDs back to the System Stack (i.e.
have the XCMDs in *both* places) then it breaks again.

So... I am not sure what's going on here.  I guess I will have to wait for 
my HC 2.0 docs to see if they explain this strangeness.  It seems to be
something to do with hierarchy.  Does anyone have a clue?

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                                           |
|  Robin Goldstone, Systems Software Specialist                             |
|  California State University, Chico   Computing Services                  |
|  rgoldstone@oavax.csuchico.edu                                            |
|                                                                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

smelly@polari.UUCP (Tom Benedict) (12/02/90)

egarding the problems reported by Robin Goldstone w/oracle and HC2.0
pathnames. 
I suggest you try the 'Start Using.." command on the Oracle System Stack.
That SHOULD do the same thing as installing the XCMDs in Home.
I too wonder why HC2.0 handles resource in such a different way tahan 
HS1.2x. XCMDs NEVER work until I quit HC then restart after installation
with REsecopy. Must be the new XCMD  intreace
.
Sorry for all the typos, I don't know how to erase them. I am not a UNIX
user.

gasp@bucsd.bu.edu (Isaac Kohane) (12/16/90)

Here's how I simplemindedly had a smooth transition to HC 2.0 with Oracle:

1) I kept the execsql xcmd within the application stack that I had
built from scratch (i.e. sans application generator)

2) I converted the application stack. I did NOT convert the system
stack and did NOT change my send commands to the system stack.

Victory through sloth.

-Zak