# RDO与SQL Server 6.5的连接问题

Posted by 周邦信 on October 08, 1997 at 19:27:28:

请教诸位先进，
我使用vb6的RDO连接SQL Server 6.5
为什么我将rdoConnection的CursorDriver设为rdUserServer
OpenConnection时将Readonly设为False
OpenResultset时将Type设为rdOpenKeyset
所开出来的Resultset的Type却仍是rdOpenStatic呢？

以下是我的程式码：
Dim sql As String
Dim cn As New rdoConnection
Dim qr As rdoQuery
Dim rs As rdoResultset

Private Sub Form_Load()
cn.Connect = "DSN=SqlDdm;DATABASE=DDM;"
cn.CursorDriver = rdUseServer
cn.EstablishConnection rdDriverNoPrompt, False
sql$ = "select * from Basic"
Set qr = cn.CreateQuery("sample", sql$)
Set rs = qr.OpenResultset(rdOpenKeyset, rdConcurLock)
Debug.Print rs.Type
End Sub

Follow Ups:

- 我现在没有 SQL 6.5 小吴 23:20:46 10/08/97 (0)