Re: v15 how do I feed a SQL query result to a listbox?
> Le 8 nov. 2019 à 02:30, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > > Thanks! Hi Chip, I'd add 2 things… 1/ the INTO LISTBOX target variable must not be a local one 2/ after the SQL populates the listbox, resulting headers/columns names are "automatic" and uneasy to predict; I also remember in previous 4d versions they could use existing names in the form without throwing an error; anyway I prefer to rename them after the query: //LB_renameCH (LBname_t) //rename columns + headers of a listbox using listbox name C_TEXT($1) $LBname_t:=$1 $nbCol_l:= LISTBOX Get number of columns(*;$LBname_t) ARRAY TEXT($obj_at;0) LISTBOX GET OBJECTS(*;$LBname_t;$obj_at) For ($i_l;1;$nbCol_l) $arr_p:=OBJET Get pointer(Object named;$obj_at{$i_l*3-2}) $head_p:= OBJET Get pointer(Object named;$obj_at{$i_l*3-1}) $title_t:=OBJET Get title(*;$obj_at{$i_l*3-1}) $Cname_t:=$LBname_t+"_C"+String($i_l) $Hname_t:=$LBname_t+"_H"+ String($i_l) LISTBOX INSERT COLUMN(*;$LBname_t;$nbCol_l+$i_l;$Cname_t;$arr_p->;$Hname_t;$head_p->) OBJET SET TITLE(*;$Hname_t;$title_t) LISTBOX DELETE COLUMN(*;$LBname_t;1) End for -- Arnaud de Montard ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: v15 how do I feed a SQL query result to a listbox?
Thanks! > > > See the bottom of this page: > https://doc.4d.com/4Dv16/4D/16.6/Managing-List-Box-Objects.300-4445342.en.html > > On 11/7/19, 3:11 PM, "4D_Tech on behalf of Chip Scheide via 4D_Tech" > <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> > wrote: > > I believe that this is possible. > I am not sure how to go about doing such. > > Any help? > thanks > Chip > We have done so much, with so little, for so long; > We are now qualified to anything with nothing > - unknown > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** Hell is other people Jean-Paul Sartre ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: v15 how do I feed a SQL query result to a listbox?
See the bottom of this page: https://doc.4d.com/4Dv16/4D/16.6/Managing-List-Box-Objects.300-4445342.en.html On 11/7/19, 3:11 PM, "4D_Tech on behalf of Chip Scheide via 4D_Tech" <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote: I believe that this is possible. I am not sure how to go about doing such. Any help? thanks Chip We have done so much, with so little, for so long; We are now qualified to anything with nothing - unknown ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
v15 how do I feed a SQL query result to a listbox?
I believe that this is possible. I am not sure how to go about doing such. Any help? thanks Chip We have done so much, with so little, for so long; We are now qualified to anything with nothing - unknown ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **