Change Date and Change User

Creating tables and queries

Change Date and Change User

Postby zizo » Mon Apr 05, 2021 2:46 pm

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
zizo
 
Posts: 5
Joined: Mon Mar 29, 2021 12:34 am

Re: Change Date and Change User

Postby Villeroy » Mon Apr 05, 2021 3:05 pm

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
User avatar
Villeroy
Volunteer
 
Posts: 29452
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Change Date and Change User

Postby Mountaineer » Tue Apr 06, 2021 8:36 am

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
Mountaineer
 
Posts: 65
Joined: Sun Sep 06, 2020 8:27 am

Re: Change Date and Change User

Postby zizo » Tue Apr 06, 2021 9:08 am

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 9 times
Open office Apache 4.1.9 on macOS 11.1
zizo
 
Posts: 5
Joined: Mon Mar 29, 2021 12:34 am

Re: Change Date and Change User

Postby Villeroy » Tue Apr 06, 2021 11:43 am

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
Villeroy
Volunteer
 
Posts: 29452
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Change Date and Change User

Postby RoryOF » Tue Apr 06, 2021 12:07 pm

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.9 on Xubuntu 20.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 32340
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Change Date and Change User

Postby Villeroy » Tue Apr 06, 2021 8:42 pm

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
User avatar
Villeroy
Volunteer
 
Posts: 29452
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Change Date and Change User

Postby zizo » Wed Apr 07, 2021 2:42 pm

what other frontend would you recomend?
Open office Apache 4.1.9 on macOS 11.1
zizo
 
Posts: 5
Joined: Mon Mar 29, 2021 12:34 am


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 2 guests

cron