blog.jj5.net (2003 to 2005)

Well, I need to cry on *someone's* shoulder..

Tue Apr 27 22:13:00 UTC+1000 2004

Categories:

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.


Copyright © 2003-2005 John Elliot