[Gambas-user] databases

Benoît Minisini g4mba5 at gmail.com
Thu Oct 14 13:25:17 CEST 2021


Le 14/10/2021 à 12:56, David Silverwood via User a écrit :
> Hi All
> 
> I came across a very strange occurrence, not sure what the problem may be.
> I have a couple of database interfaces (sqlite3), however (and this is 
> only the second time this has occurred) I found that when creating 
> tables gb _sometimes_ kicks out 'gbSerial' as in the following code:
> 
>      hTable.Fields.Add("REF", gb.Serial)
>      hTable.Fields.Add("DATE", gb.Date)
>      hTable.Fields.Add("INVOICE", gb.String)
>      hTable.Fields.Add("QUANTITY", gb.Float)
>      hTable.Fields.Add("DESCRIPTION", gb.String)
>      hTable.Fields.Add("PRICE", gb.Float)
>      hTable.PrimaryKey = ["REF"]
>      hTable.Update
> 
> I can only assume I am missing a library somewhere, however, when I 
> checked the components on the other interfaces, they were all the 
> same... so I have two interfaces that don't work and the rest do... (not 
> in the same program). Can someone shed some light on this, please? What 
> exactly have I done wrong on the 2 'problem children'?
> PS. I used the gb.db and gb.db.form components
> 
> Thanks
> 
> David
> 

I can't tell without a full project that could reproduce the bug.

You can set the environment variable GB_DB_DEBUG=1, to see all SQL 
requests that are sent to the sqlite backend. Maybe you will get more 
information about the problem?

Regards,

-- 
Benoît Minisini


More information about the User mailing list