只需一步,快速开始
1970-1-1 08:00| 发布者: towjx| 查看: 1446| 评论: 0
Function Sqlser_time() As Date '获得SQL服务器时间Dim cnn As New ADODB.ConnectionDim cmd As New ADODB.CommandDim rst As New ADODB.Recordset
cnn.ConnectionString = "driver={SQL Server};" & _ "server=SER;uid=sa;pwd=a123;database=master" cnn.Open
cmd.ActiveConnection = cnn cmd.CommandText = "SELECT GETDATE() AS sys_Sqlser_time"
Set rst = cmd.Execute Sqlser_time = rst(0)
rst.Closecnn.Close
End Function
评论
|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )
GMT+8, 2024-4-30 01:59 , Processed in 0.095729 second(s), 16 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.