Re: [sqlite] Field not editable

2014-02-13 Thread James K. Lowden
On Thu, 13 Feb 2014 10:01:28 + Simon Slavin wrote: > Your question is an example of a long term discussion about whether > your entire business philosophy should be encoded within your SQL > databases, with numerous FOREIGN KEYs, CONSTRAINTs and TRIGGERs used > to

Re: [sqlite] Field not editable

2014-02-13 Thread James K. Lowden
On Thu, 13 Feb 2014 21:40:53 +0100 Zsbán Ambrus wrote: > > I want the name of the country can not be changed. > > You can put all the tables you want to be not changable to a separate > database file which you attach as read-only. Use the ATTACH statement > with the URI

Re: [sqlite] Field not editable

2014-02-13 Thread Zsbán Ambrus
On 2/13/14, O.D. vidal wrote: > I would like a field is not editable. What is the best solution? > > I want the name of the country can not be changed. You can put all the tables you want to be not changable to a separate database file which you attach as read-only. Use the

Re: [sqlite] Field not editable

2014-02-13 Thread O.D. vidal
sorry, it works well with a trigger and raise(abort, ‘cause'). Le 13 févr. 2014 à 09:50, O.D. vidal a écrit : > > Hello all, > > I would like a field is not editable. What is the best solution? > > For example, I have a table Country: > > id - Name > > 1 - Brazil > 2 -

Re: [sqlite] Field not editable

2014-02-13 Thread O.D. vidal
ok, thank you very much Simon! olivier Le 13 févr. 2014 à 11:01, Simon Slavin a écrit : > > On 13 Feb 2014, at 9:55am, O.D. vidal wrote: > >> Why do you say: >> >>> This would normally be done inside your programming language. >> >> strengthen the

Re: [sqlite] Field not editable

2014-02-13 Thread Simon Slavin
On 13 Feb 2014, at 9:55am, O.D. vidal wrote: > Why do you say: > >> This would normally be done inside your programming language. > > strengthen the rule directly in the database seems common sense. I can see that argument, which is why I bothered figuring out the TRIGGER.

Re: [sqlite] Field not editable

2014-02-13 Thread O.D. vidal
Thank you Simon! Why do you say: > This would normally be done inside your programming language. strengthen the rule directly in the database seems common sense. olivier Le 13 févr. 2014 à 10:37, Simon Slavin a écrit : > > On 13 Feb 2014, at 8:50am, O.D. vidal

Re: [sqlite] Field not editable

2014-02-13 Thread Simon Slavin
On 13 Feb 2014, at 8:50am, O.D. vidal wrote: > I would like a field is not editable. What is the best solution? > > For example, I have a table Country: > > id - Name > > 1 - Brazil > 2 - Canada > ... > > I want the name of the country can not be changed. This would

[sqlite] Field not editable

2014-02-13 Thread O.D. vidal
Hello all, I would like a field is not editable. What is the best solution? For example, I have a table Country: id - Name 1 - Brazil 2 - Canada ... I want the name of the country can not be changed. Thank you! Greetings olivier ___