[Gambas-user] How to write sql query in gambas way

bb adamnt42 at gmail.com
Tue May 10 06:48:24 CEST 2022


On Tue, 2022-05-10 at 09:02 +0545, Safiur Rahman wrote:
> Hi
> 
> That cannot be the answer. The array can be of variable count and
> count may
> go to twenty or thirty.
> 
> On Mon, 9 May 2022, 21:40 Safiur Rahman, <isafiur at gmail.com> wrote:
> 
> > Hi
> > 
> > I get result when I execute the following query:
> > 
> > Dim res As Result
> >   res = conn.Exec("select fldtitle from tbltest where flddepartment
> > in('Austria','Azerbaijan')")
> > 
> > But I don't get result when I execute the following query:
> > res = conn.Exec("select fldtitle from tbltest where flddepartment
> > in &1",
> > ["Austria", "Azerbaijan"])
> > 
> > How can I write this query properly in gambas passing an array
> > argument?
> > 
> > (Attached a project to demonstrate)
> > 
> > --
> > Regards
> > Safiur Rahman
> > 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
Hint. Try using db.debug=true. You should see then why your code is not
doing what youe think.
b 



More information about the User mailing list