revdb_init

Trevor DeVore lists at mangomultimedia.com
Tue Jun 15 12:38:26 EDT 2004


On Jun 15, 2004, at 10:08 AM, K wrote:
> Does revdb library require some initialization when in a standalone? 
> My applciation is executing witout error in the RAD but throws a 
> exeception when attempting to open a database in a standalone.

How did you build your standalone?  Is it one executable file or did 
you use the splash screen method where you have an executable that 
opens your program stack?  If the former than make sure that you 
include the database support libraries when you build the executable.  
If the latter then you need to start using the stack that you built the 
executable with in your program stack since the externals functions are 
assigned to and available only within the splash screen stack.

Here is an example-

You have two stacks.  Stack 1 is splash.rev which is used to build the 
executable.  Stack 2 is program.rev which is your main program stack 
which has all of the database calls.  When you build splash.rev as an 
executable Revolution will assign the externals it needs to connect and 
talk to the database to the splash.rev stack.  Any calls to a database 
will work if called from splash.rev.  When you executable calls 
something like

go to stack "program.rev"

and you try to make calls to the revdb_* in program.rev these calls 
will fail since the external functions/commands are not in the message 
path for this stack.  To fix this you can do the following in 
program.rev -

start using stack "splash.rev"

which will make all of the external functions/commands available to 
splash.rev available to your program.rev stack as well.  This should 
fix the problem.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list