Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Sun, 2017-12-03 at 16:48 +0100, Robert Großkopf wrote: > Hi Harvey, > > > > > > I've got it. The hsqldb driver pool had to be enabled in the Base > > options settings. > > Have never touched there anything. The conneection-pool is disabled > here. > Do you use the LO-version from OpenSUSE or do you use LO downloded > directly from LO-website? > > I prefer the version from LO directly and test all with this > versions. I always use the OpenSuse packages unless I need something they don't have. Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Hi Harvey, > > I've got it. The hsqldb driver pool had to be enabled in the Base > options settings. Have never touched there anything. The conneection-pool is disabled here. Do you use the LO-version from OpenSUSE or do you use LO downloded directly from LO-website? I prefer the version from LO directly and test all with this versions. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Macro will be executed here and update to 2,4,3 will be executed. Hallo Robert, > > Don't know what is going wrong there with your installation. > > > > If you have opened the table at the same time you have to refresh > > the > > data of the table afterwords - but if you don't see the messagebox > > there > > is something totally wrong with macro-executing. > > > Hi Robert, > > I fear that you are right, there is something totally wrong with the > macro. Another reason for not wanting to go that way. I've got it. The hsqldb driver pool had to be enabled in the Base options settings. Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Sun, 2017-12-03 at 09:37 +0100, Robert Großkopf wrote: > > > Hi Robert, > > > > I think I can see what you are trying to do, but nothing happens on > > clicking the button. > > First there should appear a messagebox with question: "Should the > code > ... be executed?" > If you click "yes" here the update will be executed. > > > > > The values of 'class' remain fixed at 1,3,2. Also > > I get no messages like warning of macro execution. (Macro Security > > level Medium) > > I have the same: Security medium, my only documents in Trusted > Sources > > Trusted File Locations. > > Macro will be executed here and update to 2,4,3 will be executed. > > Don't know what is going wrong there with your installation. > > If you have opened the table at the same time you have to refresh the > data of the table afterwords - but if you don't see the messagebox > there > is something totally wrong with macro-executing. > Hi Robert, I fear that you are right, there is something totally wrong with the macro. Another reason for not wanting to go that way. Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Hi Harvey, >> >> here is a little example-database for executing SQL by a macro. >> http://robert.familiegrosskopf.de/download/Example_InsertUpdateDelete >> _SQL.odb >> Open the form and try. Could be constructed a little bit better, but >> works when code is right. >> >> Regards >> >> Robert > > Hi Robert, > > I think I can see what you are trying to do, but nothing happens on > clicking the button. First there should appear a messagebox with question: "Should the code ... be executed?" If you click "yes" here the update will be executed. > The values of 'class' remain fixed at 1,3,2. Also > I get no messages like warning of macro execution. (Macro Security > level Medium) I have the same: Security medium, my only documents in Trusted Sources > Trusted File Locations. Macro will be executed here and update to 2,4,3 will be executed. Don't know what is going wrong there with your installation. If you have opened the table at the same time you have to refresh the data of the table afterwords - but if you don't see the messagebox there is something totally wrong with macro-executing. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Sat, 2017-12-02 at 20:57 +0100, Robert Großkopf wrote: > Hi Harvey, > > here is a little example-database for executing SQL by a macro. > http://robert.familiegrosskopf.de/download/Example_InsertUpdateDelete > _SQL.odb > Open the form and try. Could be constructed a little bit better, but > works when code is right. > > Regards > > Robert Hi Robert, I think I can see what you are trying to do, but nothing happens on clicking the button. The values of 'class' remain fixed at 1,3,2. Also I get no messages like warning of macro execution. (Macro Security level Medium) Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Hi Harvey, here is a little example-database for executing SQL by a macro. http://robert.familiegrosskopf.de/download/Example_InsertUpdateDelete_SQL.odb Open the form and try. Could be constructed a little bit better, but works when code is right. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Sat, 2017-12-02 at 10:42 +0100, Alexander Thurgood wrote: > Le 01/12/2017 à 23:08, Harvey Nimmo a écrit : > > Hi Harvey, > > You are correct, it would improve the user experience of Base by an > important measure to have a GUI UPDATE capability. This is something > that has been desired by users since the days of StarOffice, through > OpenOffice.org to the present day with LibreOffice. We're looking at > a > period of over 20 years here. > > As of yet, no developer has stepped up to the plate to provide that > functionality, bearing in mind that the precursors to LibreOffice > were > curated by some rather large corporations, it could have been done, > but > sadly never was. The fact of the matter is that Base is still rather > the > "runt" of LO development. One of the reasons for this is no doubt the > complexity of having to understand both database programming > principles > and specificities and the LO code behind Base itself. There are > easier > targets for developers to pick and choose, and so these tend to get > chosen over something meatier like what you are asking for. > > Currently, Base development goes in fits and starts. Current Firebird > integration was the result of at least one GSOC project (two or three > in > fact, I seem to recall). The fact that the transition to Firebird as > the > default embedded database engine is still not complete, is an > indication > of the lack of interest in seeing things through, unfortunate though > that may be. > > There are several other areas where Base development could do with a > serious boost, but unless developers can be attracted to them, very > little will change. Some of the core developers working on other > areas > of LO never touch anything database-related and in their humble > opinions > if Base were to disappear in a puff of smoke, they wouldn't be > particularly saddened. Indeed, they would probably be happier that > the > code had been lightened by several tens of thousands of lines of > code, > and not least, be rid of all Java dependencies. > > > So, you see, it is an uphill battle just to keep what we have, let > alone > develop new features for it. > > > > Alex > Ah...thank you Alex. What a pity, all those programmers are missing a wonderful opportunity to give someone joy in life!! ;-) Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Base - a risky feature of the document display?
Le 01/12/2017 à 23:08, Harvey Nimmo a écrit : Hi Harvey, You are correct, it would improve the user experience of Base by an important measure to have a GUI UPDATE capability. This is something that has been desired by users since the days of StarOffice, through OpenOffice.org to the present day with LibreOffice. We're looking at a period of over 20 years here. As of yet, no developer has stepped up to the plate to provide that functionality, bearing in mind that the precursors to LibreOffice were curated by some rather large corporations, it could have been done, but sadly never was. The fact of the matter is that Base is still rather the "runt" of LO development. One of the reasons for this is no doubt the complexity of having to understand both database programming principles and specificities and the LO code behind Base itself. There are easier targets for developers to pick and choose, and so these tend to get chosen over something meatier like what you are asking for. Currently, Base development goes in fits and starts. Current Firebird integration was the result of at least one GSOC project (two or three in fact, I seem to recall). The fact that the transition to Firebird as the default embedded database engine is still not complete, is an indication of the lack of interest in seeing things through, unfortunate though that may be. There are several other areas where Base development could do with a serious boost, but unless developers can be attracted to them, very little will change. Some of the core developers working on other areas of LO never touch anything database-related and in their humble opinions if Base were to disappear in a puff of smoke, they wouldn't be particularly saddened. Indeed, they would probably be happier that the code had been lightened by several tens of thousands of lines of code, and not least, be rid of all Java dependencies. So, you see, it is an uphill battle just to keep what we have, let alone develop new features for it. Alex -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Fri, 2017-12-01 at 19:56 +0100, Robert Großkopf wrote: Hi Robert, I appreciate your comments! Many thanks. > What you perform with the query-editor isn't a query. A query > shouldn't > change the content of any table. From a purist viewpoint, you are right, of course! My mind has been damaged by MSAccess which does allow data manipulation via the query editor. > So you need another possibility to > update, insert or delete data through GUI, which must show a warning > like, for example, phpMyAdmin does. But remember: phpMyAdmin is a > tool > for ADMINs, not for normal users of the DB. But phpMyAdmin it is a possibility which works. But my point here is that it hardly speaks for LOBase, if I need to use another application (e.g. phpMyadmin or Mysql Workbench) to do something simple, as in my example. > At this moment: > Tools > SQL Except that Tools > SQL apparently does not provide for storage and recall of the SQL statements, unless I have missed something here. Could be an alternative, if the Database objects pane were extended to include stored SQL statements / procedures(?) > or > A form through which you start macros for execute updates, insert or > delete. Could be you will save the SQL-code anywhere. I would prefer > a > table with a varchar-field. The content of this field would be read > by a > macro through the button and will be executed. > > SUB ChangeData(oEvent as OBJECT) > DIM oConnection AS OBJECT > DIM oForm AS OBJECT > DIM stSql AS STRING > DIM oSql_Statement AS OBJECT > oForm = oEvent.Source.Model.Parent > oConnection = oForm.activeConnection() > stSQL = oForm.getByName("SqlCode").CurrentValue > oSQL_Statement = oConnection.createStatement() > oSQL_Statement.executeUpdate(stSql) > END SUB > > You could set a messagebox into this macro. So you will be able to > cancel the execution of the update/delete/insert > That is what I wanted to avoid, because of the relative complexity for a rather simple operation. (Users would love LOBase if simple things could be done simply, without having to burrow into the bowels of Macro Basic or worse) Regards Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Hi Harvey, > > Obviously, I found this behaviour (by accident) because I was looking > for it, and because I needed it. Also obviously, my feeling is that > LOBase is not doing itself a favour by restricting usage of SQL in this > way. I would prefer a feature that allowed data manipulation via > queries, but caught risky situations with a warning, for example. What you perform with the query-editor isn't a query. A query shouldn't change the content of any table. So you need another possibility to update, insert or delete data through GUI, which must show a warning like, for example, phpMyAdmin does. But remember: phpMyAdmin is a tool for ADMINs, not for normal users of the DB. > > Or is there another simple way of data manipulation in LOBase, that > would not be easier by resorting to phpMyadmin or Mysql Workbench? At this moment: Tools > SQL or A form through which you start macros for execute updates, insert or delete. Could be you will save the SQL-code anywhere. I would prefer a table with a varchar-field. The content of this field would be read by a macro through the button and will be executed. SUB ChangeData(oEvent as OBJECT) DIM oConnection AS OBJECT DIM oForm AS OBJECT DIM stSql AS STRING DIM oSql_Statement AS OBJECT oForm = oEvent.Source.Model.Parent oConnection = oForm.activeConnection() stSQL = oForm.getByName("SqlCode").CurrentValue oSQL_Statement = oConnection.createStatement() oSQL_Statement.executeUpdate(stSql) END SUB You could set a messagebox into this macro. So you will be able to cancel the execution of the update/delete/insert Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Thu, 2017-11-30 at 15:50 +0100, Robert Großkopf wrote: > > ... > > It has never beeen intended that the query-editor is used for > changing > data. There is a feature-request for this: > https://bugs.documentfoundation.org/show_bug.cgi?id=31398 > since 7 years. > The risky feature is: the native connector of MySQL will allow this > at > this moment. > > If we write a bug-description about this the solution at this moment > could be the "feature" of the direct connection will be taken away > instead of changing something in the GUI, which works right with > internal Database and other external connectors. Obviously, I found this behaviour (by accident) because I was looking for it, and because I needed it. Also obviously, my feeling is that LOBase is not doing itself a favour by restricting usage of SQL in this way. I would prefer a feature that allowed data manipulation via queries, but caught risky situations with a warning, for example. Or is there another simple way of data manipulation in LOBase, that would not be easier by resorting to phpMyadmin or Mysql Workbench? Regards Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Base - a risky feature of the document display?
Le 30/11/2017 à 15:50, Robert Großkopf a écrit : > If we write a bug-description about this the solution at this moment > could be the "feature" of the direct connection will be taken away > instead of changing something in the GUI, which works right with > internal Database and other external connectors. > Agreed. Alex -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Hi Harvey, > > I am accessing a backend Mariadb V10 on a backend server via > MySQL(Native). > > The Base query contains only the following statement: > UPDATE Family.Adressen SET Print_flag = FALSE; > > LO Version 5.3.5.2 from OpenSuse on Linux. > Have tested this with nearly the same configuration (OpenSUSE 42.2, LO 5.4.3.2 and native connector). You are right. It's possible to send an update to MariaDB whitout any error-message. Have tested the same with JDBC-connection to MariaDB. There it is impossible to send an update. You get the message ... Can not issue data manipulation statements with executeQuery() ... It has never beeen intended that the query-editor is used for changing data. There is a feature-request for this: https://bugs.documentfoundation.org/show_bug.cgi?id=31398 since 7 years. The risky feature is: the native connector of MySQL will allow this at this moment. If we write a bug-description about this the solution at this moment could be the "feature" of the direct connection will be taken away instead of changing something in the GUI, which works right with internal Database and other external connectors. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Wed, 2017-11-29 at 18:43 +0100, Robert Großkopf wrote: > Hi Harvey, > > > > > > The UPDATE query is allowed (i.e. stored in the queries list) if > > you > > 'edit in SQL view' and then set the 'Run SQL Command directly' in > > the > > SQL editor. If you don't do it this way only SELECT queries are > > permitted. > > If I try this the message appears: > Statement does not generate a result set. > Update wouldn't be performed. > > Please post the code you are running and the version of LO, which you > are using. Sorry, I need to give a little more info. I am accessing a backend Mariadb V10 on a backend server via MySQL(Native). The Base query contains only the following statement: UPDATE Family.Adressen SET Print_flag = FALSE; LO Version 5.3.5.2 from OpenSuse on Linux. -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
On Wed, 2017-11-29 at 18:43 +0100, Robert Großkopf wrote: > Hi Harvey, > > > > > > The UPDATE query is allowed (i.e. stored in the queries list) if > > you > > 'edit in SQL view' and then set the 'Run SQL Command directly' in > > the > > SQL editor. If you don't do it this way only SELECT queries are > > permitted. > > If I try this the message appears: > Statement does not generate a result set. > Update wouldn't be performed. > > Please post the code you are running and the version of LO, which you > are using. The query contains only the following statement: UPDATE Family.Adressen SET Print_flag = FALSE; LO Version 5.3.5.2 from OpenSuse on Linux Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Hi Harvey, > > The UPDATE query is allowed (i.e. stored in the queries list) if you > 'edit in SQL view' and then set the 'Run SQL Command directly' in the > SQL editor. If you don't do it this way only SELECT queries are > permitted. If I try this the message appears: Statement does not generate a result set. Update wouldn't be performed. Please post the code you are running and the version of LO, which you are using. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base - a risky feature of the document display?
Hi Alex, The UPDATE query is allowed (i.e. stored in the queries list) if you 'edit in SQL view' and then set the 'Run SQL Command directly' in the SQL editor. If you don't do it this way only SELECT queries are permitted. Cheers Harvey On Wed, 2017-11-29 at 14:34 +0100, Alexander Thurgood wrote: > Le 29/11/2017 à 12:27, Harvey Nimmo a écrit : > > > Hi Harvey, > > Perhaps I am misunderstanding the issue here, but the panel you refer > to > is only supposed to be a Preview of the document display. So, if you > execute a query then you get a preview of the result, which to me, > would > seem to be "functioning as designed". > > I'm slightly confused however that you write that you have an update > query in your list of "Queries" in the left hand pane. It was my > understanding that one couldn't establish UPDATE queries in this > manner > and save them to the list of queries because the built-in query > parser > would refuse to execute an update DML statement (even in "SQL direct" > mode). How exactly have you achieved this ? > > > Alex > > > -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Base - a risky feature of the document display?
Le 29/11/2017 à 12:27, Harvey Nimmo a écrit : Hi Harvey, Perhaps I am misunderstanding the issue here, but the panel you refer to is only supposed to be a Preview of the document display. So, if you execute a query then you get a preview of the result, which to me, would seem to be "functioning as designed". I'm slightly confused however that you write that you have an update query in your list of "Queries" in the left hand pane. It was my understanding that one couldn't establish UPDATE queries in this manner and save them to the list of queries because the built-in query parser would refuse to execute an update DML statement (even in "SQL direct" mode). How exactly have you achieved this ? Alex -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted