[Gambas-user] Select statement in Table property

bkv at mailbox.org bkv at mailbox.org
Sun Jan 21 14:14:56 CET 2018


Hi

I tried to set the Table property of the Datasource to an SQL SELECT in my source code, but Gambas says "unknown table". According to the documentation quoted in previous post below, it must be possible to use an SQL SELECT here. What am I doing wrong?

Here is my line of code that gives "Unknown table"

  DSPatron.Table = "SELECT p. *, k.kost_kilo From patron As p inner join krutt As k On p.krutt_id = k.krutt_id "

Regards,

Bjørn

> On January 8, 2018 at 2:35 AM T Lee Davidson <t.lee.davidson at gmail.com http://lists.gambas-basic.org/listinfo/user> wrote:
>>> You're talking about setting that property statically from the IDE, correct?
>> You may have to do it in code.
>> From http://gambaswiki.org/wiki/comp/gb.db.form/datasource/table:
> 'This property can take any SQL "SELECT" request actually. If the string does not begin with "SELECT ", it is taken as a table
> name.'
>>> -- 
> Lee
>>> On 01/07/2018 02:40 PM, bkv at mailbox.org http://lists.gambas-basic.org/listinfo/user wrote:
> > Hi
> > 
> > I want to use a SQL SELECT instead of table name in the Table property of the Datasource  object, but the property field does
> > not take input from the keyboard. I may select a table name, but it won't let me type into  the property field. I have done it
> > on another form, though. Any ideas?
> > 
> > Regards,
> > 
> > Bjørn
>>> --------------------------------------------------
>> This is the Gambas Mailing List
> https://lists.gambas-basic.org/listinfo/user
>> Hosted by https://www.hostsharing.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180121/ee2f76f4/attachment.html>


More information about the User mailing list