Foxhound is the better* Database Monitor for SQL Anywhere.
*better: More thorough, more relevant, more effective.
...more Alerts, more All Clears, more details, more control in your hands.


[Home] [Back to Tip 71] [Forward to Tip 73] [Archives]

Breck Carter
Last modified: July 3, 1997
mail to: bcarter@bcarter.com



Tip 72: ORCA Symptoms And Solutions

First of all, what is ORCA?

ORCA stands for Open Repository CASE API. It provides an external interface to all PowerBuilder library entities. With ORCA, for example, you can write a PowerBuilder program that manipulates the source code for other PowerBuilder programs: copy, delete, export, import and compile library objects, and so on.

ORCA takes the form of a DLL called PBORC050.DLL that ships with the Professional and Enterprise editions of PowerBuilder. This .DLL cannot be called directly from a PowerBuilder program, at least not for the really useful functions, because it makes use of callback functions which cannot be written in PowerScript. However, Powersoft makes available an unsupported but royalty-free "wrapper" DLL called ORCACALL.DLL. This wrapper DLL can be called from PowerScript and it will make the calls to PBORC050.DLL on your behalf.

This wrapper DLL can be found in the PowerBuilder 5.0 ORCA Sample Application ftp://ftp.powersoft.com/pub2/pbuilder/samples/orc5smpl.zip.

More documentation can be found in the MS Word 6 file called PB5ORCA.DOC in ftp://ftp.powersoft.com/pub2/pbuilder/samples/pb5orca.zip.


Symptom: ORCA return code -14 "'objectname' has no ancestors" or -15 "'objectname' has no references to other objects".

Solution: Some objects do indeed have no ancestors, and some objects make no references to other objects, so these return codes can be safely ignored.


Symptom: Access violation at 0x10b068f8 or 0x10b2bf74 when running an ORCA application in the PowerBuilder development environment on NT 4.

Solution: Regenerate the whole test application with PB 5.0.03. Not just your ORCA application but the "test data" too... the PowerBuilder application that's being manipulated by your ORCA code.


Symptom: Access violation at 0x1090c1dc or 0x1090c1fc when saving an object in the PowerBuilder 5 development environment on NT 4, after earlier testing an ORCA application from the development environment.

Solution: Start two separate copies of the PowerBuilder 5 development environment, one for editing the ORCA application and the other for testing it. Even then, it's easy to forget and run a test with the wrong copy of PowerBuilder and then try to edit and save an object with the same copy... kaboom!

One way to protect yourself from losing too much work is to make frequent copies of scripts while you're working on them:

  • select the entire script and copy it into the clipboard
  • click on the Edit toolbar icon to start the built-in PowerBuilder file editor
  • click on Cancel on the File Open window
  • paste your text into the File Editor - (Untitled) window
  • choose File - Save and give it a name like $safety.srx

The $-sign makes the file name appear at the top of later File - Open lists. The extension .srx matches the default file type "Source Files (*.srx)" used by the built-in editor.


[Home] [Back to Tip 71] [Forward to Tip 73] [Archives]
     
[mail to: bcarter@bcarter.com]