Trying to return results from a query run on the database

Fred Giannetto fgiannet at hotmail.com
Thu Nov 3 15:07:53 EST 2005


It seems that it is putting the connection database ID number without 
executing the SQL statement.


>From: "Fred Giannetto" <fgiannet at hotmail.com>
>Reply-To: How to use Revolution <use-revolution at lists.runrev.com>
>To: use-revolution at lists.runrev.com
>Subject: Re: Trying to return results from a query run on the database
>Date: Thu, 03 Nov 2005 14:56:46 -0500
>
>Thank you Trevor,
>
>The function executes but only returns the Database ID connection instead 
>of the results of the query.  Anyone know why it would be doing this?
>
>All best Always
>Fred
>
>
>>From: Trevor DeVore <lists at mangomultimedia.com>
>>Reply-To: How to use Revolution <use-revolution at lists.runrev.com>
>>To: How to use Revolution <use-revolution at lists.runrev.com>
>>Subject: Re: Trying to return results from a query run on the database
>>Date: Tue, 1 Nov 2005 16:10:48 -0800
>>
>>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
>>
>>
>>_______________________________________________
>>use-revolution mailing list
>>use-revolution at lists.runrev.com
>>Please visit this url to subscribe, unsubscribe and manage your 
>>subscription preferences:
>>http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your 
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the Use-livecode mailing list