Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


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+unsubscribe@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.