In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

How do I implement Foreign key Constrain in Sqlite ?

Xailer professional forum in English
Milan Mehta
Posts: 112
Joined: Sun Dec 27, 2009 9:54 am

How do I implement Foreign key Constrain in Sqlite ?

Postby Milan Mehta » Mon Nov 11, 2013 7:11 am

How do I implement Foreign key in Sqlite ?
xaSqlite do not have facility to define Foreign key.
I tried creating database with Sqlitestudio and defined Foreign key. But Xailer do not respect that Foreign key and allowed a record to be deleted when dependency still exist !
Kindly guide us. Referential integrity is of paramount importance for any database management System.
TIA
Milan.
User avatar
ignacio
Site Admin
Posts: 8555
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

How do I implement Foreign key Constrain in Sqlite ?

Postby ignacio » Mon Nov 11, 2013 10:23 am

Milan Mehta escribió el Mon, 11 November 2013 07:11
How do I implement Foreign key in Sqlite ?
xaSqlite do not have facility to define Foreign key.
I tried creating database with Sqlitestudio and defined Foreign key. But Xailer do not respect that Foreign key and allowed a record to be deleted when dependency still exist !
Kindly guide us. Referential integrity is of paramount importance for any database management System.
TIA
Milan.

http://www.sqlite.org/foreignkeys.html
Regards
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Milan Mehta
Posts: 112
Joined: Sun Dec 27, 2009 9:54 am

How do I implement Foreign key Constrain in Sqlite ?

Postby Milan Mehta » Mon Nov 11, 2013 3:35 pm

Do I have to issue any command to enable Foreign Key constrain in Xailer ?
I observe that xailer do not generate any error when deleting a record for which dependency exist (when Foreign key constrain is defined) !
Kindly guide.
Milan.
User avatar
ignacio
Site Admin
Posts: 8555
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

How do I implement Foreign key Constrain in Sqlite ?

Postby ignacio » Mon Nov 11, 2013 5:05 pm

Milan Mehta escribió el lun, 11 noviembre 2013 15:35
Do I have to issue any command to enable Foreign Key constrain in Xailer ?
I observe that xailer do not generate any error when deleting a record for which dependency exist (when Foreign key constrain is defined) !
Kindly guide.
Milan.



Attached files
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Milan Mehta
Posts: 112
Joined: Sun Dec 27, 2009 9:54 am

How do I implement Foreign key Constrain in Sqlite ?

Postby Milan Mehta » Tue Nov 12, 2013 6:40 am

Great !
I incorporated following command in the application
:Execute("PRAGRAM foreign_keys = ON")
and it started working excellently ! Great relief.
Thanks a lot.
Milan.

Return to “English”