Hi everyone!
I’ve been diving deep into the capabilities of RichClient6 and am continuously impressed by its potential for rapid application development. A huge shoutout to Olaf Schmidt for his dedication and hard work on this framework!
I'd like to discuss a potential enhancement that could simplify and streamline SQLite operations within RC6. I’ve developed a helper class that not only eases the creation of INSERT and UPDATE commands but also seamlessly extends to SELECT operations, potentially merging the functionalities of cCommand and cSelectCommand.
Here’s how the class looks for simplified INSERT operations:
And here’s the extended utility for SELECT operations:Code:Dim nCmdInsAlt As cSqliteCmd Set nCmdInsAlt = New cSqliteCmd With nCmdInsAlt .Connection = m_Cn .TableName = "filesinuse" .SetCommand "INSERT INTO filesinuse" .SetInt32 "productid", g_cOEM.Product .SetInt32 "setuptype", uSetupType .SetText "line", uLine .SetInt32 "section", uSection .SetInt32 "usetype", eTWSUseType.eTWSUseType_InnoSetup .SetText "source", sSource .SetText "dest", sDest .SetText "destdir", sDestDir .SetText "filename", sFilename .SetText "checkstring", sCheck .Execute End With
This class reduces the need to hardcode SQLite strings and could enhance code readability and maintenance.Code:Dim nCmdSel As cSqliteCmd Set nCmdSel = New cSqliteCmd With nCmdSel .Connection = m_Cn .SetCommand "SELECT *, rowid FROM filesinuse" .SetInt32 "productid", g_cOEM.Product .SetInt32 "setuptype", uSetupType .SetInt32 "section", uSection .SetInt32 "usetype", eTWSUseType.eTWSUseType_InnoSetup .SetText "line", uLine .SetText "source", sSource .SetText "dest", sDest .SetText "destdir", sDestDir .SetText "filename", sFilename .SetText "checkstring", sCheck Set r = .ExecuteReader End With
Moreover, it could potentially unify the cCommand and cSelectCommand into a single class.
Thank you all for your insights!




Reply With Quote
