Change Date and Change User

Creating tables and queries
Post Reply
zizo
Posts: 5
Joined: Mon Mar 29, 2021 12:34 am

Change Date and Change User

Post by zizo »

Hi,
I have a database with different tables. I would like to have a column in each table that will be filled automaticlly.
In one column should be the username (not database user, OS Username)
in the other column should be the change date/time.

I have searched but I didn't find anything.

Best

zizo
Open office Apache 4.1.9 on macOS 11.1
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Change Date and Change User

Post by Villeroy »

Which type of database? See left side of the status bar of the Base main window.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Mountaineer
Posts: 310
Joined: Sun Sep 06, 2020 8:27 am

Re: Change Date and Change User

Post by Mountaineer »

Depending on your database, a time-stamp may be achieved with a TRIGGER in SQL, but I guess the username will have to be stored by macro in a form/column.

Concerning the name: Is your database filled by different accounts on the same computer?

J.
OpenOffice 3.1 on Windows Vista
zizo
Posts: 5
Joined: Mon Mar 29, 2021 12:34 am

Re: Change Date and Change User

Post by zizo »

Hi,
I have added to the tables shops and and productcat the columns username and datetime.

@Villeroy which status bar do you mean?
@Mountaineer the plan is to access from different computers via a cloud

zizo

edit: please find attached an examble db
Attachments
order.odb
(21.02 KiB) Downloaded 229 times
Open office Apache 4.1.9 on macOS 11.1
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Change Date and Change User

Post by Villeroy »

The status bar of the Base document window which reads "embedded HSQLDB SA" where SA is the default user "System Admin". This is a single-user desktop database and nothing else. It requires a local place on your disk. You've got to install a database server on your cloud server. If you really want to use this office suite as a database frontend, you can connect the Base document to that server. The status bar of your Base document window will read something like: jdbc mysql://mycloud:3306/MyDatabase and the name of the logged in user.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Change Date and Change User

Post by RoryOF »

To see the Status Bar of which Villeroy writes, you may need, in OpenOffice, to turn on /View /Status Bar (this will also turn it off, but we recommend leaving it on); the Status Bar will appear at bottom of the OpenOffice window.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Change Date and Change User

Post by Villeroy »

You can't hide the status bar of a Base window. It's too essential. It shows the software you are actually working with.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
zizo
Posts: 5
Joined: Mon Mar 29, 2021 12:34 am

Re: Change Date and Change User

Post by zizo »

what other frontend would you recomend?
Open office Apache 4.1.9 on macOS 11.1
Post Reply