[Gambas-user] problems with sqlite in gambas

Benoît Minisini gambas at ...1...
Sat Jul 4 15:09:05 CEST 2015


Le 04/07/2015 14:44, Klaus-Peter Mais a écrit :
>>
>> ok, ... i use the "sqlite data browser"
>> (sqlitebrowser.sourceforge.net). But also in android the fields are
>> without the reference (tableName.Field1, ........, tableName.fieldn in
>> Gambas).
>> I have the phenomenon only in gambas. Also in Android it's ok.
>>
>> Description:
>> I will copy a table with content (in a gambas app)
>> I use: create table newTable as select * from oldTable
>>
>> in my newtable i find the fieldnames: oldTable.Field1, ...........,
>> oldTable.Field2 (for example with datagrid or directly over the field
>> names with a result object.
>>
>> if i create this newtable with the sqlite browser or in android, and
>> now when I look at the newtable in gambas, the fields are correct,
>> without reference on old Table.
>> Only, if i create with the sqlite statement: create table [name] as
>> select * from [oldname], the problem arises in a gambas app.
>>
>> and unfortunately, these fields can not be addressed with SQL (for
>> example:... where fieldname = 'trulla').
>> The same SQL statement in SQLite browser or android running, there is
>> no problem. there is no reference to the oldTable.
>>
>> best Regards (from Sahara-Germany)
>>
>> Klaus-Peter Mais
>>

When you open a sqlite database, Gambas issues these commands:

PRAGMA empty_result_callbacks = ON
PRAGMA short_column_names = OFF
PRAGMA full_column_names = ON

I suggest you call "PRAGMA full_column_names = OFF" before running your 
request in Gambas.

Regards,

-- 
Benoît Minisini




More information about the User mailing list