Page 1 of 1
[Solved] Allow record edits but not inserts/deletes
Posted: Sat Nov 02, 2024 2:55 pm
by NuLeKbtw
Hi everyone!
I am working on a database in OpenOffice Base and need help creating a query. My task is to create a query called 'canteen' that allows editing data in the 'students' table. However, I do not want the query to enable adding or deleting records.
I know the ways to edit, add, and delete data in queries, but I do not know how to restrict the query to only allow editing data.
Can someone help me with this task? I would appreciate any tips and examples.
please help quickly
Re: Create a query in OpenOffice Base that allows only editing data, without the ability to add or delete records
Posted: Sat Nov 02, 2024 3:40 pm
by Nicholas59
Hi,
After having read your post, even though it would have been kind of you to add an odb file, according to my experience, if I would have had to do a query I could do it without worrying, because the query displays only what you state in the code, whilst i could choose that matter by building a form.
Your comment would be highly appreciated.
Re: Create a query in OpenOffice Base that allows only editing data, without the ability to add or delete records
Posted: Sat Nov 02, 2024 6:41 pm
by NuLeKbtw
Nicholas59 wrote: ↑Sat Nov 02, 2024 3:40 pm
Hi,
After having read your post, even though it would have been kind of you to add an odb file, according to my experience, if I would have had to do a query I could do it without worrying, because the query displays only what you state in the code, whilst i could choose that matter by building a form.
Your comment would be highly appreciated.
ok, I'm sending the file and I don't want it to be in the form, I just want it in the query, if that's possible
Re: Create a query in OpenOffice Base that allows only editing data, without the ability to add or delete records
Posted: Sat Nov 02, 2024 7:10 pm
by Nicholas59
@Mr. Nulekbtw
So far, so good. You could reach your goal by creating a view. See hereafter.
Re: Create a query in OpenOffice Base that allows only editing data, without the ability to add or delete records
Posted: Sat Nov 02, 2024 8:39 pm
by NuLeKbtw
Nicholas59 wrote: ↑Sat Nov 02, 2024 7:10 pm
@Mr. Nulekbtw
So far, so good. You could reach your goal by creating a view. See hereafter.
when I turn on the view, I cannot edit, for example, the boolean that is in the table because I only want to edit it in the query
Re: Create a query in OpenOffice Base that allows only editing data, without the ability to add or delete records
Posted: Sat Nov 02, 2024 9:02 pm
by Nicholas59
Dear Mr. New Leg Between,
As simply as you pose questions, why don't you use the wizard to choose your fields, either with a view or a query.
You may find plenty of tutorials, which could help you in pursuing your efforts.
Do apologize not being in a position to exactly understand your needs.
Regards
Re: Create a query in OpenOffice Base that allows only editing data, without the ability to add or delete records
Posted: Sat Nov 02, 2024 10:24 pm
by UnklDonald418
I know the ways to edit, add, and delete data in queries, but I do not know how to restrict the query to only allow editing data.
As the name implies a Query can only SELECT (display) table data, it cannot be used for adding, deleting or editing table data. There are other SQL commands such as INSERT, UPDATE and DELETE for changing table data but they must be executed from TOOL>SQL to communicate directly with the underlying database engine. Queries can be used as part of those commands.
While very effective, that mode of communication can be clumsy and requires good command of the SQL language.
Using a Base Form to do the communication can simplify the process.
Form Properties can be set to allow Editing records but not Adding or Deleting them, so that will likely be your best option.
You can further limit a users ability to make undesired changes by creating
Standalone Forms where the database tables are hidden from the user.