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

Safiur Rahman isafiur at gmail.com
Mon May 9 17:55:07 CEST 2022


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220509/fa031c2c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: query.zip
Type: application/zip
Size: 15001 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220509/fa031c2c/attachment-0001.zip>


More information about the User mailing list