可以从LibreOffice Base修改表条目吗? [英] Modifying table entries from LibreOffice Base, possible?

查看:155
本文介绍了可以从LibreOffice Base修改表条目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已成功将LibreOffice Base与MySQL数据库服务器连接.我已经测试过是否可以从主机修改表(Internet上的免费主机服务),然后在LO Base中刷新表对象​​时会反映出更改. 但是我的问题是,我可以直接从LO Base修改数据库表吗?我想可以使用LO Base中的sql查询,但是如何?请给我一些见解或教程.谢谢.

I've successfully connected LibreOffice Base with MySQL data base server. I've tested if I modify my table from host (free hosting service on internet) then the changes are reflected when refreshing the table object in LO Base. But my question is, can I modify DB table directly from LO Base? I guess that it's possible using sql queries from LO Base, but how? Please give me some insights or tutorials. Thanks.

推荐答案

更改表的常规方法:

  1. 工具-> SQL
  2. 输入ALTER TABLE命令并按Execute按钮.
  1. Tools -> SQL
  2. Enter an ALTER TABLE command and press Execute button.

一种有效的方法,即使它抱怨没有返回结果集:

A way that works, even though it complains that no result set is returned:

  1. 在SQL视图中创建查询.
  2. 输入ALTER TABLE命令.
  3. 单击工具栏中的按钮将其标记为Run SQL command directly.或编辑-> Run SQL command directly.
  4. 关闭查询,然后双击运行它.
  1. Create a query in SQL view.
  2. Enter ALTER TABLE command.
  3. Click button in toolbar to mark it as Run SQL command directly. Or Edit -> Run SQL command directly.
  4. Close the query and double-click to run it.

我的猜测是也可以使用宏完成,类似于 https://forum.openoffice.org/en/forum/viewtopic.php?f=5&t=75763 ,但使用ALTER TABLE.

My guess is it could be done with a macro as well, similar to https://forum.openoffice.org/en/forum/viewtopic.php?f=5&t=75763 but using ALTER TABLE.

有关更多想法,请参见 https://论坛. openoffice.org/en/forum/viewtopic.php?f=61&t=37687 .

For more ideas see https://forum.openoffice.org/en/forum/viewtopic.php?f=61&t=37687.

以表格形式插入新行数据比更改表格更容易.首先,请确保此方法有效:

Inserting new row data in a form is easier than altering the table. First, make sure this works:

  1. Tables下的表格上双击.
  2. 插入->记录,或在最后一个新行中输入数据.
  1. Double-click on your table under Tables.
  2. Insert -> Record, or enter data in the last new row.

如果禁用插入->记录,则需要设置表进行编辑.确保您与数据库的连接允许编辑.该表还必须具有主键.

If Insert -> Record is disabled, then you need to set up the table for editing. Make sure that your connection to the database allows editing. Also the table must have a primary key.

一旦您可以在表格"视图中插入记录,就该创建表格了:

Once you can insert records in Table view, it's time to create the form:

  1. FormsUse Wizard to Create Form下.
  2. 选择表,然后按>>包括所有字段.
  3. 单击Finish.
  1. Under Forms, Use Wizard to Create Form.
  2. Select your table and press >> to include all fields.
  3. Click Finish.

现在,您应该可以打开表格并将数据输入到最后的新行中.

Now you should be able to open the form and enter data into the final new row.

有关示例的更完整说明,请参见 http ://www.open-of-course.org/courses/mod/url/view.php?id = 786 .

More complete instructions with examples are at http://www.open-of-course.org/courses/mod/url/view.php?id=786.

这篇关于可以从LibreOffice Base修改表条目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆