-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathSQLQueryGroup.cls
More file actions
30 lines (28 loc) · 903 Bytes
/
SQLQueryGroup.cls
File metadata and controls
30 lines (28 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "SQLQueryGroup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'The is class is an array of differnet queries, which will be executed as one
Implements iSQLQuery
Private aQueries() As String
Private Sub Class_Initialize()
ReDim aQueries(0) As String
End Sub
Public Sub AddQuery(sQuery As String)
'Lengthen the array by one and add the new value to the end
iLength = UBound(aQueries)
If iLength = 0 And aQueries(0) = "" Then
aQueries(0) = sQuery
Else
ReDim Preserve aQueries(0 To UBound(aQueries) + 1) As String
aQueries(UBound(aQueries)) = sQuery
End If
End Sub
Public Function iSQLQuery_ToString() As String
iSQLQuery_ToString = Join(aQueries, ";")
End Function