I'm refactoring some legacy VB6 code to try and minimise database corruption issues. Some of this code is *terrible*. Some of it is not so much *terrible* as it is *pointless*, like this for example:
Public Function OpenRS(pDatabase As database, psSQL As String) As Recordset
Dim rsTmp As Recordset
Set rsTmp = pDatabase.OpenRecordset(psSQL, dbOpenDynaset)
Set OpenRS = rsTmp
End Function
Eeek.
Anyway, for the sake of it I just rewrote it like this for now:
Public Function OpenRS(database As database, sql As String) As Recordset
Set OpenRS = database.OpenRecordset(sql, dbOpenDynaset)
End Function
Soon I'll go through and remove this function altogether..
Did I mention I had VB6? (not as much as DAO though!)
John.