using database query builder

Jan Schenkel janschenkel at yahoo.com
Sat Jun 14 02:47:01 EDT 2003


--- rand valentine <jrvalent at wisc.edu> wrote:
>   I have several questions about working with Rev
> and databases (I'm using
> Valentina xcmd for now on a mac running os 10.2.6).
> 
> 1. When I open my main working stack, I have a
> Database Query Builder
> (hereafter DBQB) connection that connects to a
> Valentina database that
> presently has two tables, BasicLexicon and Keys. I
> have two queries, one for
> the table BasicLexicon and one for the table Keys.
> When I run
> 
> revopendatabases()
> 
>   I get the answer: 4
> 
>   Why not 1, 2, or 3? Why 4 for the database ID? It
> doesn't matter if I quit
> Runrev, turn off my computer, etc. I always get 4.
> 

It's an internal, unique number ; nothing to worry
about, heh ; it just references the right connection
info for its other functions if you want to make
direct calls using the revDB functions.

> 2. In DBQB, I set a certain field as the primary
> field for a given query.
> But whenever I recheck the query, the primary field
> is listed as "None"
> until I click the "refresh query" button. Why would
> this be?
> 

If it's the same when you click the refresh button,
there's nothing to worry about, and it probably has to
do with the moment the connection is opened - when the
stack opens or when the card opens ; it will only
display this info once the query has been
executed/refreshed once.

> 3. Previously I reported that I was able to use
> revDataFromQuery to get the
> results of a join, that is, request data from two
> distinct tables and have
> it stitched together. But now this no longer works
> -- when I execute the
> revDataFromQuery using the command that worked
> before, I get:
> 
> revdberr,
> 
> and that's all. Any ideas on what's going on? Also,
> if I can't do a join in
> this way, how _do_ I do one?
> 

It ought to work, but are you sure that's the entire
error ? Usually, it's followed by an explanation.
Have you tried :
  get revDataFromQuery(...)
  if char 1 to 6 of it i "revdberr" then answer it

I'm sure it's just a small thing, that can be resolved
with a bit of fiddling.

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the use-livecode mailing list