[Gambas-user] Application with more SQL-tables

T Lee Davidson t.lee.davidson at gmail.com
Tue Jul 7 13:38:56 CEST 2020


On 7/7/20 6:11 AM, Dag Jarle Nerland Johansen - Gambas wrote:
> Hi,
> I write a software which includes several SQL-tables.
> To avoid a lot of typing I want to write a function making the SQL-string for insert into and update the tables.
> Insert into and update differs in the format, so I want to make a function for that.
> For the fields I can use a simple array with the field names.
> But I am not quite aware of how I can put the fields on the GUI in an array.

Not sure what you mean by, "fields on the GUI." Are you displaying the table columns in a GUI control such as a GridView or 
DataView?

> They are objects, I think.
> I do not use every field for all tables, so "for each" is not what I am looking for.
> Can anyone please tell me, how I can assign a single object to an array?

Also not sure why you would want to use an array for a single object. An array is used to store multiple objects. Do you mean 
how to *add* a single object to an array? If so, use the array's Add method.

A simple example might help to illustrate what you are trying to accomplish.


-- 
Lee


More information about the User mailing list