[Database] Retrieving sql statement result
Bob Sneidar
bobs at twft.com
Thu Apr 29 15:34:50 EDT 2010
Hi Marcello.
It's my understanding that only SQL statements that return a value of some kind will return the data you expect. To do what you are trying to do, you would need a persistent connection, and then a way to monitor that connection for any data coming back over the socket. I suppose the RevDB api could be improved to support the kinds of things you are trying to do, but presently Revolution does not making a direct persistent connection to the SQL database, but rather is acting as a broker between the two. Otherwise you would be able to create read/write cursors, modify the cursors, then commit them to the SQL database again, which you cannot. Much of my difficulty in using SQL with Revolution revolved around this limitation.
I am willing to bet however, that you could accomplish this using shell commands. There are a great deal of posts in this forum about initiating shell sessions in the Mac terminal, or the Windows command line.
Bob
On Apr 27, 2010, at 1:36 AM, Marcello Bertoli wrote:
> Hi all,
>
> I have a question about runrev database commands. Is there a way to get the result of a sql statement that doesn't retrieve data (is not a select)? For example:
>
> In a postgresql scenario I need to execute the statement:
>
> "listen foo"
>
> and I need to retrieve the result.
>
> It seems that the only rev command I can use is revExecuteSql but in this way I can't get the result the sql engine gives after the statement is executed. revDataFromQuery seems to work only for retrieving data from a query, not from a statement...
>
> Any ideas?
>
> Thanks in advance
> Best Regards
>
> Marcello_______________________________________________
> 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