# Re: 请问在 vb6 要如何使ADO

Posted by 小羊 on September 24, 1998 at 13:31:50:

In Reply to: 请问在 vb6 要如何使ADO posted by john on August 25, 1998 at 15:38:10:

: 我要如何才能在 vb6 中使用 ADO 这个物件
你可以参照以下CODE
Set ADOgrdoconn = New ADODB.Connection '建立ado的connection
ADOgrdoconn.Open lsconnect '建立connectionDim ADOrs1 As Recordset
lssql = "SELECT SYSDATE=GETDATE()"
Dim ADOrs1 As Recordset
Set ADOrs1 = New ADODB.Recordset
ADOrs1.CursorType = adOpenStatic
ADOrs1.CursorLocation = adUseClient
ADOrs1.Open lssql, lsconnect, , , adCmdText
ADOgdsysdate = ADOrs1("SYSDATE")
ADOrs1.Close

Follow Ups: