GeoMedia Discussions

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 14
Registered: ‎06-21-2018
Accepted Solution

Default date as today

Hi everyone

How is it possible to define the default value of an object's attribute with type "date" to be the respective date?

I did try to use NOW and TODAY, but did not manage to configure it correctly.

Thanks for your help,

Fabienne

Regular Contributor
Posts: 234
Registered: ‎05-25-2016

Re: Default date as today

Hi Fabienne,

 

which database server do you use?

 

Configure it direct in the database not in GeoMedia.

 

Regards,

hesrah

Occasional Contributor
Posts: 14
Registered: ‎06-21-2018

Re: Default date as today

Hi Hesrah

That's a good idea, thanks for the input.

Best, Fabienne

Super Contributor
Posts: 349
Registered: ‎03-10-2016

Re: Default date as today

Hi @hesrah 

 

do you if it's possible to define this in an Access-Warehouse?

I need to save the date when one a) creates a new object and b) edits an existing one.

 

Thanks in advance

Stefan

GAUSS Ingenieurtechnik GmbH | Germany
Super Contributor
Posts: 349
Registered: ‎03-10-2016

Re: Default date as today

Hi,

just an update: insert date with a new object is not a problem, but my case b) seems to be difficult directly out of GM in Access.

GAUSS Ingenieurtechnik GmbH | Germany
Regular Contributor
Posts: 234
Registered: ‎05-25-2016

Re: Default date as today

Hi s.rutka

 

Yes, for new data records use the expression =Date() as default value (in table draft view of Access).

 

For existing data records you can't do this in GeoMedia and an Access Warehouse.

You would need triggers for that. But Access doesn't support triggers with the old mdb database format.

In Access you can solve this problem with events in a form. However you can't use these events in combination with GeoMedia.

 

In Access 2010 and newer there are macros for tables. This is something like a trigger.

I have never used it in combination with a third party application. And I guess it is more something like an "event on the Access table editor". Maybe these events/macros will not be fired if a third party application use the table. - Anyway, GeoMedia can't use A2010 and newer.

 

I don't see any possiblities to do this for insert date with the standard attribute property dialog in GeoMedia and an Access Warehouse. It would be only possible with code.

 

Best regards

hesrah

Super Contributor
Posts: 349
Registered: ‎03-10-2016

Re: Default date as today

Thank you for your quick answer - this is what I expected...

 

Thanks!

Stefan

GAUSS Ingenieurtechnik GmbH | Germany