Re: [Database] Retrieving sql statement result
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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: [Database] Retrieving sql statement result
On Tue, Apr 27, 2010 at 6:36 PM, Marcello Bertoli mbert...@libero.it 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... If you check the result after your revExecuteSQL statement, it should contain the data you need. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: [Database] Retrieving sql statement result
On 28/apr/2010, at 11.12, Sarah Reichelt wrote: If you check the result after your revExecuteSQL statement, it should contain the data you need. Hi Sarah, thank you for your answer. the result of revExecuteSql doesn't seem to contains the information the sql engine answers and I need to retrieve. the listen command in postgresql returns text data. For example the sql result of the statement: listen foo; is LISTEN or LISTEN Asynchronous notification foo received from server process with PID ... I need to retrieve this result text. If I execute: revExecuteSQL connectionId, listen foo and I check the result, it is 0, according to the documentation which says that for successful query the result is the number of rows affected and for other (successful) statements is 0. Any idea? Thanks again Best Regards Marcello___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
[Database] Retrieving sql statement result
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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution