请问有关oracle中的cursor类型
yhp 2001-09-06 11:13:09 我在用ado连接oracle 8.05时,返回的recordcount等于-1,代码如下
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.Open "Provider=MSDAORA.1;Password=bjxt;User ID=bjxt;" & _
"Data Source=bjxt;Persist Security Info=True"
rs.Open "select * from yqdm", conn, 1, 1
MsgBox rs.RecordCount
此时显示-1,但是如果在rs.Open "select * from yqdm", conn, 1, 1 之前加入
rs.CursorLocation = adUseClient
此时显示了正确的结果22。
但是如果连接到sql server 7,rs.cursorlocation等于adUseClient还是adUseServer
都能得到正确的结果。
所以请问这是什么原因?oracle 中的cursor类型是什么?