Trying to return results from a query run on the database
Trevor DeVore
lists at mangomultimedia.com
Tue Nov 1 19:10:48 EST 2005
On Nov 1, 2005, at 4:03 PM, Fred Giannetto wrote:
> Hello,
>
> I am trying to create a list of data entered into the database.
>
> I have recently tried
>
> get revDataFromQuery(tDatabaseEnroll,"SELECT lname, fname, ID from
> usrev.results")
> --revQueryDatabase(tDatabaseEnroll,select "lname", "fname", "ID"
> from usrev.results")
> --revQueryDatabase(tDatabaseEnroll,"select `lname`, `fname`, `ID`
> from usrev.results")
> answer it
Hi Fred,
First statement: Your parameters are wrong. The parameters for
revDataFromQuery are:
revDataFromQuery([columnDelim],[rowDelim],databaseID,SQLQuery
[,varsList])
Second statement: Two things - revQueryDatabase is a function and
quotes are wrong. You need to wrap your entire string in double
quotes. If you want to embed double quotes in the string you can use
the format function or something like:
get "SELECT "& quote& "fname"& quote&", "& quote& "ID"& ...
Third Statment: revQueryDatabase is a function. The examples in the
docs are incorrect. Call it like this (the transcript should all be
on one line):
put revQueryDatabase(tDatabaseEnroll,"select `lname`, `fname`, `ID`
from usrev.results") into tRecordSetID
--
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the use-livecode
mailing list