DB Access in standalones

Devin Asay devin_asay at byu.edu
Tue Aug 19 13:48:00 EDT 2003


I wrote Monday about my problems trying to get my standalone to connect 
to a mySQL database:

>> the standalone does not successfully contact the database.
>> Instead I get a revdberr, invalid database type. (I chose to include
>> error messages during distribution building.

Jan provided a useful clue:
On Tuesday, August 19, 2003, at 12:45  AM, Jan Schenkel 
<janschenkel at yahoo.com> wrote:

> You might want to check out the Transcript dictionary
> entry for the 'revSetDatabaseDriverPath' command.
>

What I did was use the startup handler to 1) set the defaultFolder to 
the folder containing the main stack, then 2) use the 
revSetDatabaseDriverPath command to set the database driver path to the 
defaultFolder. In OS X this happens to be in the App 
bundle/Contents/MacOS/.

Now when I do this I can contact the database successfully as long as I 
remain in the main stack. As soon as I go to a substack (where most of 
the queries take place) it stops working. Even when I go back to the 
main stack the database queries no longer work. I am back to the 
situation where I get a revdberr, invalid database type error. This 
sounds a lot like what Jacque wrote about:

On Tuesday, August 19, 2003, at 12:47  AM, "J. Landman Gay" 
<jacque at hyperactivesw.com> wrote:

> Is the externals property set to the right path? The externals property
> is relative to the application bundle, not the engine inside the
> Contents folder. That's probably why Rev puts it where you first found
> it. I believe Rev also tries to set the externals property during a
> build. If you moved the files, the path that Rev sets would no longer 
> be
> accurate (and it produces a silent error in that case.)
>
> This sounds a lot like the problems I've had loading externals, which
> has almost always been a problem with paths during startup. Also, if it
> applies, it seems to help to keep all the database calls in the
> mainstack rather than in substacks. There seems to be some problem with
> substacks that make calls to externals.

If I insert an answer dialog in the standalone to report the externals 
property, it says "revdb.bundle", which, as Jacque said, supposedly 
means relative to the application bundle. I take this to mean inside 
the app bundle, but the Distribution Builder puts it at the same level 
as the app bundle.

What is the real story here? The documentation is not very detailed on 
this point, and in fact does not seem to reflect what's really 
happening. Can someone on the Rev team explain it to me? Tuviah? Geoff? 
I really need to get this application up soon. Thanks.

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list