Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!ucdavis!csusac!csuchico.edu!RGOLDSTONE@OAVAX.CSUCHICO.EDU From: rgoldstone@OAVAX.CSUCHICO.EDU (Robin Goldstone) Newsgroups: comp.sys.mac.hypercard Subject: ORACLE/HC 2.0 Message-ID: <0094061E.3AAD5280@OAVAX.CSUCHICO.EDU> Date: 28 Nov 90 17:45:45 GMT Sender: news@ecst.csuchico.edu (USENET) Reply-To: rgoldstone@OAVAX.CSUCHICO.EDU (Robin Goldstone) Organization: California State University, Chico Lines: 49 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 | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+