-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathConnection.dfm
176 lines (174 loc) · 4.36 KB
/
Connection.dfm
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
object DT_connection: TDT_connection
OldCreateOrder = False
Height = 427
Width = 613
object FDPhysSQLiteDriverLink1: TFDPhysSQLiteDriverLink
Left = 64
Top = 8
end
object FDcon: TFDConnection
Params.Strings = (
'Database=c:\bd\ArduinoDB.db'
'OpenMode=ReadWrite'
'LockingMode=Normal'
'DriverID=SQLite')
Connected = True
LoginPrompt = False
Left = 176
Top = 8
end
object qryColeta: TFDQuery
Connection = FDcon
SQL.Strings = (
'select * from coleta')
Left = 360
Top = 16
end
object FDPhysSQLiteDriverLink2: TFDPhysSQLiteDriverLink
Left = 56
Top = 72
end
object qrySensor: TFDQuery
Connection = FDcon
SQL.Strings = (
'select SetorSensor, NomeSensor,Rede from Sensor')
Left = 352
Top = 80
object qrySensorSetorSensor: TStringField
FieldName = 'SetorSensor'
Origin = 'SetorSensor'
Size = 10
end
object qrySensorNomeSensor: TStringField
FieldName = 'NomeSensor'
Origin = 'NomeSensor'
Size = 12
end
object qrySensorRede: TBCDField
FieldName = 'Rede'
Origin = 'Rede'
Precision = 3
Size = 2
end
end
object qryvalorKWHcity: TFDQuery
Connection = FDcon
SQL.Strings = (
'select * from valorKWHcity')
Left = 288
Top = 16
object qryvalorKWHcityCidade: TWideStringField
FieldName = 'Cidade'
Origin = 'Cidade'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Size = 50
end
object qryvalorKWHcityValorKWH: TBCDField
FieldName = 'ValorKWH'
Origin = 'ValorKWH'
DisplayFormat = '0.000000'
currency = True
Precision = 3
Size = 2
end
object qryvalorKWHcityObs: TWideStringField
FieldName = 'Obs'
Origin = 'Obs'
Size = 100
end
end
object qryVaxrede: TFDQuery
Connection = FDcon
SQL.Strings = (
'select DISTINCT s.SensorID, s.SetorSensor,sum (c.cvalor * s.Red' +
'e) as Potencia_W, sum (c.cvalor * s.Rede) /1000 as KWh,'
''
''
''
' s.rede from Sensor s, coleta c '
'where s.SensorID = c.Sensor_SensorID and c.data =c.data'
''
''
''
'group by s.SetorSensor')
Left = 424
Top = 16
end
object qryEquip: TFDQuery
Connection = FDcon
SQL.Strings = (
'Select idEquipamentosSetor ,DescricaoEquip, TipoEquipamento_idTi' +
'poEquipamento,QTDE, Especificacao, Sensor_SensorID from Equipam' +
'entosSetor')
Left = 288
Top = 80
object qryEquipDescricaoEquip: TStringField
FieldName = 'DescricaoEquip'
Origin = 'DescricaoEquip'
Size = 50
end
object qryEquipTipoEquipamento_idTipoEquipamento: TStringField
FieldName = 'TipoEquipamento_idTipoEquipamento'
Origin = 'TipoEquipamento_idTipoEquipamento'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
Size = 100
end
object qryEquipQTDE: TIntegerField
FieldName = 'QTDE'
Origin = 'QTDE'
end
object qryEquipEspecificacao: TStringField
FieldName = 'Especificacao'
Origin = 'Especificacao'
Size = 100
end
object qryEquipSensor_SensorID: TIntegerField
FieldName = 'Sensor_SensorID'
Origin = 'Sensor_SensorID'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
end
object qryEquipidEquipamentosSetor: TIntegerField
FieldName = 'idEquipamentosSetor'
Origin = 'idEquipamentosSetor'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
end
end
object qrySensor2: TFDQuery
Connection = FDcon
SQL.Strings = (
'select * from Sensor')
Left = 416
Top = 80
object StringField1: TStringField
FieldName = 'SetorSensor'
Origin = 'SetorSensor'
Size = 10
end
object StringField2: TStringField
FieldName = 'NomeSensor'
Origin = 'NomeSensor'
Size = 12
end
object BCDField1: TBCDField
FieldName = 'Rede'
Origin = 'Rede'
Precision = 3
Size = 2
end
object qrySensor2SensorID: TIntegerField
FieldName = 'SensorID'
Origin = 'SensorID'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
end
end
object qryTipoEquip: TFDQuery
Connection = FDcon
SQL.Strings = (
'select * from TipoEquipamento')
Left = 504
Top = 16
end
end