[Gambas-user] Looking up data from a second table
Christof Thalhofer
chrisml at deganius.de
Mon Feb 19 23:59:05 CET 2018
Am 19.02.2018 um 23:19 schrieb bkv at mailbox.org:
> Chrisof
You are better than Piccoro ;-)
> I tried to enter the sql select statement into the Table property of the
> Datasource as suggested. Gambas will let me write text into this
> property only if I let the Connection property be blank. In that case
> calling the MoveFirst method fails. Something is not right.
>
> I also created the view in the sqlite3 console, but the view does not
> show up in Gambas, so I wasn't able to use it.
>
> Please remember that the main purpose of this form is to maintain the
> /patron/ record. I need the field from /krutt/ only as additional
> information displayed.
I am not familiar with the gb.db.form component. But in theory the
connection to a db is created once and then can be used for a lot of
different sql statements.
This is the way I do it in my db programming all the time. For that I
have created my own components.
But when I look at the components in gb.db.form I see in the help of
DataView:
----8<----------------------------------------------------------------
DataSource.Connection (gb.db.form)
Property Connection As Connection
Return or set the Connection that will be used by the DataSource
control. If no connection is set, the DataSource will use the default
connection.
----8<----------------------------------------------------------------
So I think you should try to set up a default connection ... ?
Alles Gute
Christof Thalhofer
--
Dies ist keine Signatur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180219/a5920d92/attachment.sig>
More information about the User
mailing list