clsGS_Parameters.cls
1.93 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "clsGS_Parameters"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit
'local variable(s) to hold property value(s)
Private mvarString_Connection_Secundary As String 'local copy
Public Property Let String_Connection_Secundary(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.String_Connection_Secundary = 5
mvarString_Connection_Secundary = vData
End Property
Public Property Get String_Connection_Secundary() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.String_Connection_Secundary
String_Connection_Secundary = mvarString_Connection_Secundary
End Property
Public Function getData(Conn As ADODB.connection, tipo As String) As Boolean
Dim rs As ADODB.Recordset
Dim stringconexao As String
Dim a As String
Dim b As String
Dim c As String
Dim d As String
Dim e As String
a = "STRING_CONNECTION_SECUNDARY"
c = "GS_PARAMETERS"
If frmCanvas.TipoConexao <> 4 Then
stringconexao = "SELECT String_Connection_Secundary from GS_PARAMETERS"
Else
stringconexao = "Select " + """" + a + """" + " from " + """" + c + """"
End If
Set rs = Conn.execute(stringconexao)
If rs.EOF = False Then
If rs.Fields("String_Connection_Secundary").value <> "" Then
String_Connection_Secundary = rs.Fields("String_Connection_Secundary").value
End If
End If
getData = True
rs.Close
Set rs = Nothing
End Function