1

Hy I wrote an Application with Gambas uning SQLite

When I try to port to another Linux Ditro, I have different keys for the fields in the resultset for the SQLite Result

For example:

sqlect * from table

In on resultset I get

res["Tablename.Column1"] = Value
res["Tablename.Column2"] = Value
res["Tablename.Column3"] = Value

and In onther it is

res["Column1"] = Value
res["Column2"] = Value
res["Column3"] = Value

this is a big problem for me. Any Ideas ?

4

2 回答 2

2

经过很长的旅程,我找到了它:我必须打电话

PRAGMA short_column_names = OFF

非常详细的信息可以在这里找到:

https://www.sqlite.org/pragma.html#pragma_full_column_names

于 2016-06-03T21:59:37.980 回答
0

文档说:

如果存在 AS 子句,则结果列的名称是该列的“AS”子句的值。如果没有 AS 子句,则列的名称是未指定的,并且可能会从 SQLite 的一个版本更改为下一个版本。

因此,获得一致的结果列名称的唯一可靠方法是使用 AS。

于 2016-06-04T06:26:34.733 回答