DB Access in standalones

Ken Ray kray at sonsothunder.com
Tue Aug 19 17:36:00 EDT 2003


I hate to mention this, but I've been using Valentina for over 6 months
now and decided not to use the Rev libraries to connect to or implement
my use of the database. (For those who are wondering why, my main reason
is that I need to do a lot with manipulating data inside of a cursor and
posting that data back to the Valentina DB, plus creating/modifying
tables on the fly, which Rev's functions don't cover very well.)

When I connect directly to the Valentina XCMD using Valentina calls,
everything works fine for me; I recommend that until this situation on
DB access in standalones is fixed/resolved by RunRev that those who need
to work with Valentina just call the XCMD directly. 

Just my 2 cents,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com 
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of 
> J. Landman Gay
> Sent: Tuesday, August 19, 2003 3:00 PM
> To: use-revolution at lists.runrev.com
> Subject: Re: DB Access in standalones
> 
> 
> On 8/19/03 1:21 PM, Devin Asay wrote:
> 
> > 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.
> 
> I would also appreciate an explanation from someone who 
> knows. After I 
> answered you yesterday, I spent almost five hours wrestling 
> with exactly 
> the same problem. I never could get the external to load 
> properly. Like 
> you, I tried a startup handler that called 
> revSetDatabaseDriverPath but 
> it did no good. I also moved all the scripts from a substack that 
> contained the DB calls into the main stack script but that 
> didn't help 
> either. I tinkered with scripts endlessly and probably built 40 or 50 
> trial standalones, none of which worked. The stack works fine 
> in the IDE.
> 
> This should not be so hard, and I suspect there is a problem 
> with either 
> the engine or the distribution builder. I did find an error in Rev's 
> database library scripts which I thought could be the problem, but 
> fixing it still didn't cause the externals to load for me.
> 
> Even so, you will probably want to try fixing Rev's DB 
> library script. 
> It's in the stack called "revlibrary.rev", which contains a 
> group that 
> gets copied to your standalone during a build. You'll need to 
> edit the 
> script of the group called "revLibraries" which contains a 
> preOpenBackground handler. That handler starts out like this:
> 
> on preOpenBackGround
>    repeat with i = 1 to the number of btns in me
>      if the short name of button i is among the items of 
> "revTable,revDatabase" then
>        insert script of button i of me into front
>      else
>        insert script of btn i of me into back
>      end if
>    end repeat
> 
> If this group isn't the first one placed on the card in the 
> standalone, 
> the script will fail to insert the database lib scripts in 
> some cases, 
> and will insert non-database button scripts arbitrarily from other 
> buttons in your stack. If that happens, all Rev-related 
> database calls 
> will fail. The fix is to change line 3 to this:
> 
>   if the short name of button i OF ME is among the items of 
> "revTable,revDatabase" then
> 
> This ensures that the right set of button scripts are 
> inserted. (It took 
> me forever to find this bug, since you can't look at the 
> group's script 
> once it is in a standalone.) I've bug-reported it and Runtime 
> fixed it 
> yesterday, but people will probably want to alter their 
> current copies 
> of the library to accomodate until the next release comes out.
> 
> I thought this fix was the clincher and things would work 
> properly after 
> that, but as I said, the external still didn't load even with the 
> revised library script. I am not at liberty to send Runtime 
> the stacks I 
> am working on, but if you can send them yours, I hope you 
> will. It seems 
> to be a common problem for many of us and I'd like to see it resolved 
> soon. As near as I can tell, there are some stacks which 
> simply cannot 
> use the database externals in OS X.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 





More information about the use-livecode mailing list