Bug #27353 MyODBC 3/ ADO server side static cursor not supporting required functions
Submitted: 21 Mar 2007 18:42 Modified: 21 Mar 2007 18:43
Reporter: Erica Moss Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.14, 5.1.8 OS:Microsoft Windows (XP sp2)
Assigned to: Assigned Account CPU Architecture:Any
Tags: odbc51_postga
Triage: D4 (Minor)

[21 Mar 2007 18:42] Erica Moss
Description:
According to MS:
For a Recordset of this CursorType = adOpenStatic 
The Supports method must return True for all of these constants:
 adBookmark, adHoldRecords, adMovePrevious, adResync
http://msdn2.microsoft.com/en-us/library/ms677593.aspx

Of these, the only one which seems to be working is adMovePrevious.  This means several key functions such as cloning and resync will not work

How to repeat:
Private Sub Test()
    On Error GoTo EH
    Dim strSQL As String
    Dim strConn As String
    Dim connection1 As ADODB.Connection
    Dim recset1 As ADODB.Recordset
    Dim recset2 As ADODB.Recordset

    Set connection1 = New ADODB.Connection
    Set recset1 = New ADODB.Recordset
 
    strConn = "DRIVER={MySQL ODBC 3.51 Driver};" & _
        "SERVER=localhost;DATABASE=ado" & _
        ";USER=root;PASSWORD=mypass;OPTION=3;"
        
    ' open connection
    connection1.ConnectionString = strConn
    connection1.CursorLocation = adUseServer
    connection1.Open
   ' open recordset
   
    strSQL = "Select 1"
 
    recset1.Open strSQL, connection1, adOpenStatic, _
             adLockOptimistic, adCmdText

    MsgBox "CurType: " & recset1.CursorType
    MsgBox "supports bookmarks: " & recset1.Supports(adBookmark)
    MsgBox "supports hold records:" & recset1.Supports(adHoldRecords)
    MsgBox "supports move previous:" & recset1.Supports(adMovePrevious)
    MsgBox "supports resync:" & recset1.Supports(adResync)
    
    recset1.Resync

    '  It won't make it here
    Set recset2 = recset1.Clone

    recset1.Close
    Set recset1 = Nothing
    Set recset2 = Close
    connection1.Close
    Set connection1 = Nothing
    Exit Sub

EH:
    MsgBox Err.Number & ":" & Err.Description
End Sub