# Re: 如何得知SQL return的值??

Posted by John on October 05, 1999 at 14:10:50:

In Reply to: 如何得知SQL return的值?? posted by 默默 on October 04, 1999 at 18:29:43:

: 我用ADO连上SQL Server, 我想要知道SQL Server的系统时间, 所以用"select getdate()", 但是, 我要如何去得知它所return的值呢?
example:
Private Sub Command1_Click()
Dim sql As String
Dim txtDate As String
sql = "select getdate() as date1"
rs.Open sql, cn
txtDate = rs("date1")
MsgBox txtDate
End Sub

Follow Ups: