Subject |
Re: Paremeter for SQL SELECT |
From |
WJS <warrawarra@warra.com> |
Date |
Sat, 28 Mar 2015 11:50:23 +0200 |
Newsgroups |
dbase.getting-started |
On 2015-03-28 08:47 AM, Mervyn Bick wrote:
> On Sat, 28 Mar 2015 07:34:44 +0200, WJS <warrawarra@warra.com> wrote:
>
>
>>> I find that where the query is created as a standalone object the rowset
>>> doesn't display in a grid on the form. ........
>>
>> What happens when you specifically set the datalink to the grid for
>> the standalone query
>
>
>
> function PUSHBUTTON1_onClick
> form.q = new Query()
> form.q.sql=[SELECT * FROM mbJob WHERE Id = "A"]
> form.q.requestLive := false
> form.q.active:=true
> form.grid2.datalink = form.q.rowset
> return
>
> https://www.dropbox.com/s/j874kds5tvt8249/q%20on%20form.jpg?dl=0
>
>
> function PUSHBUTTON1_onClick
> q = new Query()
> q.sql=[SELECT * FROM mbJob WHERE Id = "A"]
> q.requestLive := false
> q.active:=true
> form.grid2.datalink = q.rowset
> return
>
> https://www.dropbox.com/s/6ui9v3b6wmm49kq/q%20in%20variable.jpg?dl=0
>
> Mervyn.
Hmmmm,
I did not look at your form before but now did.
I assume the second block of code should be for PUSHBUTTON2_onClick.
Running this form in vers. 2.6.2, the PUSHBUTTON2_onClick works
perfectly. I do this many times in various apps and it always shows data
in the grid.
Wian
|
|