"lylefair" <ly******@yahoo .ca> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
What do you get when running something like this?
Dim rs As ADODB.Recordset
Dim SQL As String
SQL = "SELECT * FROM FFDBATransactio ns WHERE TotalAmount>100 "
Set rs = New ADODB.Recordset
rs.Open SQL, CurrentProject. Connection, adOpenKeyset, adLockReadOnly
Debug.Print "Cursor Type Is Keyset? ", rs.CursorType = adOpenKeyset
I get False
Debug.Print "Cursor Type Is Static? ", rs.CursorType = adOpenStatic
I get True
Very strange indeed. I'm using Access 2000, in case that makes a
difference.
---------------------------------------------------
Dim rs As ADODB.Recordset
Dim SQL As String
SQL = "SELECT * FROM Itineraries"
Set rs = New ADODB.Recordset
rs.Open SQL, CurrentProject. Connection, adOpenKeyset, adLockReadOnly
Debug.Print "Cursor Type Is Keyset? ", rs.CursorType = adOpenKeyset
Debug.Print "Cursor Type Is Static? ", rs.CursorType = adOpenStatic
rs.Close
---------------------------------------------------
Cursor Type Is Keyset? True
Cursor Type Is Static? False
---------------------------------------------------
I tried it the other way, out of curiosity.
---------------------------------------------------
Dim rs As ADODB.Recordset
Dim SQL As String
SQL = "SELECT * FROM Itineraries"
Set rs = New ADODB.Recordset
rs.Open SQL, CurrentProject. Connection, adOpenStatic, adLockReadOnly
Debug.Print "Cursor Type Is Keyset? ", rs.CursorType = adOpenKeyset
Debug.Print "Cursor Type Is Static? ", rs.CursorType = adOpenStatic
rs.Close
---------------------------------------------------
Cursor Type Is Keyset? False
Cursor Type Is Static? True
---------------------------------------------------
I also tried it without specifying cursor type. They both showed false.