You are here: Re: Getting System Time From SQL Server « MsSQL Server « IT news, forums, messages
Re: Getting System Time From SQL Server

Posted by Erland Sommarskog on 11/28/07 22:23

Neil (nospam@nospam.net) writes:
> I'm using an Access MDB as a front end to a SQL 7 database. When I place
> the system time in a field in Access, it used the user's clock. I'd like
> to use the SQL Server system time, so that the times will be
> synchronized. I suppose I can just do a pass-through query with "select
> getdate()." But I was wondering if there was some built-in method,
> either in Access or SQL Server. I'm concerned about the overhead of
> running a pass-through query every time I need the current time.

It you want the time on the server, "SELECT getdate()" is probably the
simplest way to do it. But you could of course make a remote procedure
call outside SQL Server as a little exercise in Windows programming
if you like. I can't see that's worth the pain, though.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация