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


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+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.