[dba-Tech] Problems with dbReadOnly option

Dan Waters dwaters at usinternet.com
Tue Mar 11 20:12:15 CDT 2008


I've come across a problem that seems to be a bug.

With this code:

    Dim stg As String
    Dim rst As DAO.Recordset
    
    stg = "SELECT * FROM tblTest"
1)  Set rst = DBEngine(0)(0).OpenRecordset(stg, dbOpenDynaset, dbReadOnly)
2)  Set rst = DBEngine(0)(0).OpenRecordset(stg, dbOpenDynaset, , dbReadOnly)
3)  Set rst = DBEngine(0)(0).OpenRecordset(stg, dbOpenDynaset, dbReadOnly,
dbReadOnly)

Line 1 works, as the help file says it should.  But putting dbReadOnly into
this position is now obsoleted.

Line 2 does not work, but help says that this is now the correct way to do
it.

Line 3 does work, even though help explicitly says that this will cause an
error.

Anyone have similar experiences or know what is happening?

Thanks!
Dan






More information about the dba-Tech mailing list