VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This function returns a server date when you are connected to SQL Database through Microsoft RDO fr

by Issa Fahmy (7 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Wed 15th August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This function returns a server date when you are connected to SQL Database through Microsoft RDO from a workstation. If no date is returned

Rate This function returns a server date when you are connected to SQL Database through Microsoft RDO fr



  
  'Declare a resultset variable
  Dim rs As rdoResultset
  'Ignore all errors in case of any
  On Error Resume Next
  Err.Clear
  'Open a resultset that picks the server date else returns workstation date
  Set rs = rdoconnect.OpenResultset("SELECT Getdate() as ServerDate")
  If Err.Number <> 0 Then SessionDate = Date Else SessionDate = rs!ServerDate
  Set rs = Nothing
  Err.Clear

End Function

Download this snippet    Add to My Saved Code

This function returns a server date when you are connected to SQL Database through Microsoft RDO fr Comments

No comments have been posted about This function returns a server date when you are connected to SQL Database through Microsoft RDO fr. Why not be the first to post a comment about This function returns a server date when you are connected to SQL Database through Microsoft RDO fr.

Post your comment

Subject:
Message:
0/1000 characters