[Gambas-user] gambas, sqlite and foreign key
T Lee Davidson
t.lee.davidson at gmail.com
Mon Apr 29 22:38:42 CEST 2019
It works for me even with all lowercase:
Dim Res As Result
$con.Exec("pragma foreign_keys = on")
Res = $con.Exec("pragma foreign_keys")
Print Res!foreign_keys ' Prints "1"
___
Lee
[System]
Gambas=3.12.90 f23228638 (master)
On 4/29/19 4:15 PM, Jorge Carrión wrote:
> This works for me:
>
> miconectionSqlite.Exec <http://gambaswiki.org/wiki/lang/exec>("*PRAGMA* foreign_keys = ON")
>
> Hope it helps...
>
> Best Regards
>
> El lun., 29 abr. 2019 a las 21:19, Peter Peyotle (<peterpeyotle at gmx.de <mailto:peterpeyotle at gmx.de>>) escribió:
>
> Hello, again.
>
> I have the following problem with sqlite and gambas.
> I would like to use the functions of Foreign Key with sqlite and gambas.
> The problem with this is that with Gambas the execute statement "pragma foreign_keys = on" is unsuccessful. The "pragma
> foreign_keys" statement always returns "0", ie no foreign key is active.
> However, if I set the foreign key property at the shell level, this will correctly return the "1" (at the shell level) as a
> successful setting. If I use the same database at the same time as this one on the shell level, however, I only get back the
> "0" in Gambas, so no foreign key is active. Does Gambas have a problem with the foreign key?
> So set foreign key on the shell level - no problem.
> Create foreign key within Gambas - not possible.
> I have already tested this with different sqlite versions higher than 3.6 in the virtualbox with Lubuntu and Ubuntu. Always
> the same result.
> How can I use Foreign Key with Gambas?
> For solutions and suggestions, I would be very grateful.
>
>
> greetings
>
> Peter ......
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
More information about the User
mailing list