Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/ClassModules/SQLConnection.cls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ Implements iSQLConnection
'This allows unit testing without an active database implementation
'The native Connection uses several function names which are reserved keywords

Private orst As ADODB.Connection
Private ocnt As ADODB.Connection

Public Property Get iSQLConnection_Connection()
Set iSQLConnection_Connection = ocnt
End Property

Public Sub iSQLConnection_OpenConnection()
ocnt.Open
Expand Down
1 change: 0 additions & 1 deletion src/ClassModules/SQLDatabase.cls
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ Public Function Execute(oSQL As iSQLQuery, Optional return_column = "")
'Bitwise And the State property with The adStateOpen constant
If CBool(rst.State And adStateOpen) = True Then rst.CloseRecordset
If CBool(cnt.State And adStateOpen) = True Then cnt.CloseConnection
Set cnt = Nothing
End Function

'InsertGetNewID
Expand Down
4 changes: 2 additions & 2 deletions src/ClassModules/SQLRecordset.cls
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Public Function iSQLRecordset_State()
iSQLRecordset_State = orst.State
End Function

Public Sub iSQLRecordset_OpenRecordset(MyQuery As String, Connection)
orst.Open MyQuery, Connection
Public Sub iSQLRecordset_OpenRecordset(MyQuery As String, MyConnection)
orst.Open MyQuery, MyConnection.Connection
End Sub

Public Sub iSQLRecordset_CloseRecordset()
Expand Down
4 changes: 4 additions & 0 deletions src/ClassModules/iSQLConnection.cls
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ End Property
Public Function State()

End Function

Public Property Get Connection()

End Function
4 changes: 4 additions & 0 deletions testing/ClassModules/SQLTestConnection.cls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Implements iSQLConnection

Public Property Get iSQLConnection_Connection()

End Property

Public Sub iSQLConnection_OpenConnection()

End Sub
Expand Down