Solved

Ms Access Database Timestamp

Posted on 2009-07-14
4
513 Views
Last Modified: 2013-11-27
Dear Experts,

I created a client-server based application in MS Access.
On the server side runs a scheduler which releases tasks every minute in the On Timer event.
After the tasks have been released, the scheduler puts the current date and time (Now()) in a table.
On the client side, there is a monitor who checks if the scheduler is still running.
To make sure the scheduler is running, the client application compairs the timestamp on the client side (also now()) with the value entered in the table by the scheduler on the server side.

Issue is that the server and client computers have different timestamps. Sometimes more than 5 minutes.
Now I was wondering if there is a way to get the timestamp of the database. I know that in an Oracle database you can select the timestamp from the DUAL. Is there a way to do this in Ms Access?

If not, I might consider upsizing the application to Ms SQL Server.
But than again the same question ; Is there a way to select the timestamp of Ms SQL Server?

Thanks in advance.

Regards, Johan
0
Comment
Question by:jrameuwissen
  • 2
  • 2
4 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 24848368
Hello jrameuwissen,

With respect, Access is *not* a db server, and so there is no possibility of constructing a true client-server
architecture using Access as the db layer.

OTOH, SQL Server, MySQL, Oracle, DB2, etc are all true database servers, and if you want to build a
client-server app, those are the platforms you should be looking at.

Regards,

Patrick
0
 
LVL 1

Author Comment

by:jrameuwissen
ID: 24848435
Patrick,

I just tried to indicate that the database and the application are running on seperate machines.
In case the database was a SQL Server, how could I select the timestamp of the database from within a query?

Thanks, Johan

0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 24848611
Johan,

That depends on how you are passing in the data.  To use the server's system time, your query (or, even
better, stored procedure) should use a function such as GETDATE.  To use the client's system time, you
would need to gather that information from the client OS in the application layer, and pass it as a ststic
value to the query/sproc.

Regards,

Patrick
0
 
LVL 1

Author Closing Comment

by:jrameuwissen
ID: 31603207
Patrick,

My excuses for my late response.
I migrated the data to SQL server and use a stored procedure now. It works fine.
Thanks for pointing me in the right direction.

Regards, Johan
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question