-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.frm
2191 lines (1797 loc) · 69.2 KB
/
Main.frm
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F13C99C0-4D73-11D2-B8B2-0000C00A958C}#3.0#0"; "FPSPR30.OCX"
Begin VB.Form frmQuery
Caption = "Query : 1"
ClientHeight = 3255
ClientLeft = 1515
ClientTop = 4740
ClientWidth = 12060
ForeColor = &H8000000D&
Icon = "Main.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3255
ScaleWidth = 12060
ShowInTaskbar = 0 'False
Tag = """q1"""
Begin VB.Frame fraBus
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 390
Left = 135
TabIndex = 17
Top = 1380
Width = 3510
Begin VB.TextBox txtBuscar
Height = 285
Left = 810
TabIndex = 19
Text = "*.*"
ToolTipText = "Puede usar marcadores. Ejemplo Cli* , A* , Vi?A"
Top = 45
Width = 2565
End
Begin VB.Label lblBuscar
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Buscar:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 105
TabIndex = 18
Top = 75
Width = 660
End
End
Begin RichTextLib.RichTextBox txtQuery
Height = 2145
Left = 3945
TabIndex = 0
TabStop = 0 'False
Top = 525
Width = 7785
_ExtentX = 13732
_ExtentY = 3784
_Version = 393217
Enabled = -1 'True
ScrollBars = 3
MousePointer = 3
TextRTF = $"Main.frx":014A
End
Begin MSComctlLib.ListView lviewCampos
Height = 1140
Left = 135
TabIndex = 4
Top = 1815
Width = 3510
_ExtentX = 6191
_ExtentY = 2011
View = 3
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "imgList"
SmallIcons = "imgList"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Nombre"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Valor"
Object.Width = 3528
EndProperty
End
Begin MSComctlLib.TabStrip tabInfo
Height = 1995
Left = 90
TabIndex = 11
Top = 1005
Width = 3615
_ExtentX = 6376
_ExtentY = 3519
ImageList = "imgList"
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 4
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "Vista &Rápida"
Object.ToolTipText = "Visualizar la información del registro seleccionado"
ImageVarType = 2
ImageIndex = 9
EndProperty
BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "&Tablas"
Object.ToolTipText = "Tablas de la conexión"
ImageVarType = 2
ImageIndex = 5
EndProperty
BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "&Vistas"
Object.ToolTipText = "Vistas de la conexión"
ImageVarType = 2
ImageIndex = 8
EndProperty
BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "&Procedimientos"
Object.ToolTipText = "Procedimientos almacenados"
ImageVarType = 2
ImageIndex = 7
EndProperty
EndProperty
End
Begin VB.PictureBox Splitter
Appearance = 0 'Flat
AutoRedraw = -1 'True
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 2775
Left = 3750
MouseIcon = "Main.frx":01F8
MousePointer = 99 'Custom
ScaleHeight = 185
ScaleMode = 3 'Pixel
ScaleWidth = 6
TabIndex = 9
Tag = "0"
Top = 90
Width = 90
End
Begin MSComctlLib.StatusBar staQuery
Align = 2 'Align Bottom
Height = 255
Left = 0
TabIndex = 6
Top = 3000
Width = 12060
_ExtentX = 21273
_ExtentY = 450
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 2
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 6438
MinWidth = 6438
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 14111
MinWidth = 14111
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList imgList
Left = 5745
Top = 1335
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 9
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":034A
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":04A6
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":0602
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":075E
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":0A7A
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":0BD6
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":0D32
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":0E8E
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":0FEA
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.ProgressBar pgbQuery
Height = 240
Left = 5280
TabIndex = 3
Top = 1245
Width = 1500
_ExtentX = 2646
_ExtentY = 423
_Version = 393216
Appearance = 1
End
Begin MSComctlLib.ImageCombo imgConexiones
Height = 330
Left = 90
TabIndex = 2
ToolTipText = "Conexiones activas"
Top = 330
Width = 3645
_ExtentX = 6429
_ExtentY = 582
_Version = 393216
ForeColor = -2147483640
BackColor = -2147483643
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Locked = -1 'True
ImageList = "imgLst"
End
Begin FPSpreadADO.fpSpread griQuery
Height = 2085
Left = 3960
TabIndex = 1
Top = 540
Visible = 0 'False
Width = 7725
_Version = 196608
_ExtentX = 13626
_ExtentY = 3678
_StockProps = 64
AllowMultiBlocks= -1 'True
AutoCalc = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FormulaSync = 0 'False
MaxCols = 1
MaxRows = 1
Protect = 0 'False
SpreadDesigner = "Main.frx":1146
UserResize = 1
TextTip = 4
TextTipDelay = 250
End
Begin MSComctlLib.ImageList imgLst
Left = 4080
Top = 2610
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 3
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":1395
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":4BB1
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Main.frx":4D0D
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.TabStrip TabQuery
Height = 2775
Left = 3840
TabIndex = 5
Top = 105
Width = 8130
_ExtentX = 14340
_ExtentY = 4895
HotTracking = -1 'True
ImageList = "imgList"
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 4
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "&SQL"
Object.ToolTipText = "Digite intrucción sql"
ImageVarType = 2
ImageIndex = 1
EndProperty
BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "&Resultado búsqueda"
Object.ToolTipText = "Resultado del sql escrito"
ImageVarType = 2
ImageIndex = 2
EndProperty
BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "&Información de campos"
Object.ToolTipText = "Información de los campos de la consulta"
ImageVarType = 2
ImageIndex = 3
EndProperty
BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "&Historial de SQL"
Object.ToolTipText = "Historial con los SQL ejecutados"
ImageVarType = 2
ImageIndex = 4
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComctlLib.ListView lviewDetalle
Height = 2070
Left = 3945
TabIndex = 7
Top = 540
Width = 7740
_ExtentX = 13653
_ExtentY = 3651
View = 3
LabelWrap = -1 'True
HideSelection = -1 'True
FlatScrollBar = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "imgList"
SmallIcons = "imgList"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 5
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Nombre Físico"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Tipo"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "Largo"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 3
Text = "Decimales"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 4
Text = "Acepta Nulos"
Object.Width = 2540
EndProperty
End
Begin MSComctlLib.ListView lvwHistorial
Height = 2145
Left = 3945
TabIndex = 8
Top = 510
Width = 7740
_ExtentX = 13653
_ExtentY = 3784
View = 3
LabelEdit = 1
Sorted = -1 'True
LabelWrap = 0 'False
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "imgList"
SmallIcons = "imgList"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Nº"
Object.Width = 1411
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Sql"
Object.Width = 12347
EndProperty
End
Begin MSComctlLib.ListView lvwTablas
Height = 1620
Left = 0
TabIndex = 13
ToolTipText = "Doble clic para ejecutar tabla seleccionada"
Top = 0
Visible = 0 'False
Width = 3510
_ExtentX = 6191
_ExtentY = 2858
View = 3
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "imgList"
SmallIcons = "imgList"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Nombre tabla"
Object.Width = 5292
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Descripción"
Object.Width = 2540
EndProperty
End
Begin MSComctlLib.ListView lvwVistas
Height = 1620
Left = 0
TabIndex = 14
ToolTipText = "Doble clic para ejecutar vista seleccionada"
Top = 0
Visible = 0 'False
Width = 3510
_ExtentX = 6191
_ExtentY = 2858
View = 3
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "imgList"
SmallIcons = "imgList"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Nombre Vista"
Object.Width = 5292
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Descripción"
Object.Width = 2540
EndProperty
End
Begin MSComctlLib.ListView lvwProcs
Height = 1620
Left = 0
TabIndex = 15
ToolTipText = "Doble clic para ejecutar procedimiento seleccionado"
Top = 0
Visible = 0 'False
Width = 3510
_ExtentX = 6191
_ExtentY = 2858
View = 3
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "imgList"
SmallIcons = "imgList"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Nombre procedimiento"
Object.Width = 5292
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Descripción"
Object.Width = 2540
EndProperty
End
Begin RichTextLib.RichTextBox txtHist
Height = 2145
Left = 4095
TabIndex = 16
Top = 720
Width = 7785
_ExtentX = 13732
_ExtentY = 3784
_Version = 393217
Enabled = -1 'True
ReadOnly = -1 'True
ScrollBars = 3
MousePointer = 3
AutoVerbMenu = -1 'True
TextRTF = $"Main.frx":4E69
End
Begin VB.Label lblInfoCon
AutoSize = -1 'True
BackColor = &H00808080&
Caption = "Información de la conexión"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0FFFF&
Height = 225
Left = 90
TabIndex = 12
Top = 705
Width = 3645
End
Begin VB.Label lblOrigenes
AutoSize = -1 'True
BackColor = &H00808080&
Caption = "Seleccionar origen de datos"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0FFFF&
Height = 225
Left = 90
TabIndex = 10
Top = 90
Width = 3645
End
End
Attribute VB_Name = "frmQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private nContador As Integer
Public HayCambios As Boolean
Public m_Conexion As Integer
Private cat As New ADOX.Catalog
Private cmdx As New ADODB.Command
Private prm As New ADODB.Parameter
Private Rs As ADODB.Recordset
Private itmx As ListItem
Private flag As Boolean
' flag to indicate that a splitter recieved a mousedown
Private fInitiateDrag As Boolean
Private Const SPLT_WDTH As Integer = 4
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hWndLock As Long)
'actualizar informacion de procedimientos almacenados
Public Sub ActualizarProcedimientos()
On Local Error GoTo ErrorActualizarProcedimientos
Dim ci As ComboItem
Dim ActiveConexion As Integer
Dim K As Integer
If Not imgConexiones.SelectedItem Is Nothing Then
Call Hourglass(hwnd, True)
Call frmMain.HabilitaMenues(False)
Call frmMain.HabilitaBotones(False)
Load frmInfo
frmInfo.Label1.Caption = "Actualizando información de procedimientos ..."
frmInfo.Show
DoEvents
lvwProcs.ListItems.Clear
Set ci = imgConexiones.SelectedItem
ActiveConexion = ConexionActiva(ci.Text)
'obtener info de la conexion
'cargar procs
Set Rs = DBConnection(ActiveConexion).OpenSchema(adSchemaProcedures)
K = 1
Do While Not Rs.EOF
ReDim Preserve cState(ActiveConexion).aProcs(K)
cState(ActiveConexion).aProcs(K).Nombre = Trim$(Rs!procedure_name)
If IsNull(Rs!Description) Then
cState(ActiveConexion).aProcs(K).Descripción = ""
Else
cState(ActiveConexion).aProcs(K).Descripción = Trim$(Rs!Description)
End If
Rs.MoveNext
K = K + 1
Loop
Rs.Close
'cargar procedimientos
For K = 1 To UBound(cState(ActiveConexion).aProcs)
Set itmx = lvwProcs.ListItems.Add(, "p" & K, cState(ActiveConexion).aProcs(K).Nombre, 7, 7)
itmx.SubItems(1) = cState(ActiveConexion).aProcs(K).Descripción
Next K
tabInfo.Tabs(4).Caption = "&Procedimientos (" & lvwProcs.ListItems.Count & ")"
Unload frmInfo
Set ci = Nothing
Call frmMain.HabilitaMenues(True)
Call frmMain.HabilitaBotones(True)
Call frmMain.HabiBotones2
Call Hourglass(hwnd, False)
Else
MsgBox "Debe seleccionar una conexión.", vbCritical
End If
Exit Sub
ErrorActualizarProcedimientos:
Unload frmInfo
MsgBox "ActualizarProcedimientos : " & Err & " " & Error$, vbCritical
Call frmMain.HabilitaMenues(True)
Call frmMain.HabilitaBotones(True)
Call frmMain.HabiBotones2
Call Hourglass(hwnd, False)
Err = 0
End Sub
'actualizar tablas
Public Sub ActualizarTablas()
On Local Error GoTo ErrorActualizarTablas
Dim ci As ComboItem
Dim ActiveConexion As Integer
Dim K As Integer
If Not imgConexiones.SelectedItem Is Nothing Then
Call Hourglass(hwnd, True)
Call frmMain.HabilitaMenues(False)
Call frmMain.HabilitaBotones(False)
Load frmInfo
frmInfo.Label1.Caption = "Actualizando información de tablas ..."
frmInfo.Show
DoEvents
lvwTablas.ListItems.Clear
Set ci = imgConexiones.SelectedItem
ActiveConexion = ConexionActiva(ci.Text)
'obtener info de la conexion
'cargar tablas
Set Rs = New ADODB.Recordset
Set Rs = DBConnection(ActiveConexion).OpenSchema(adSchemaTables, Array(Empty, Empty, Empty, "TABLE"))
ReDim cState(ActiveConexion).aTablas(0)
K = 1
Do While Not Rs.EOF
If Left$(UCase$(Rs!table_name), 4) <> "MSYS" Then
ReDim Preserve cState(ActiveConexion).aTablas(K)
cState(ActiveConexion).aTablas(K).Nombre = Trim$(Rs!table_name)
If IsNull(Rs!Description) Then
cState(ActiveConexion).aTablas(K).Descripción = ""
Else
cState(ActiveConexion).aTablas(K).Descripción = Trim$(Rs!Description)
End If
K = K + 1
End If
Rs.MoveNext
Loop
Rs.Close
'cargar tablas
For K = 1 To UBound(cState(ActiveConexion).aTablas)
Set itmx = lvwTablas.ListItems.Add(, "t" & K, cState(ActiveConexion).aTablas(K).Nombre, 5, 5)
itmx.SubItems(1) = cState(ActiveConexion).aTablas(K).Descripción
Next K
tabInfo.Tabs(2).Caption = "&Tablas (" & lvwTablas.ListItems.Count & ")"
Unload frmInfo
Set ci = Nothing
Call frmMain.HabilitaMenues(True)
Call frmMain.HabilitaBotones(True)
Call frmMain.HabiBotones2
Call Hourglass(hwnd, False)
Else
MsgBox "Debe seleccionar una conexión.", vbCritical
End If
Exit Sub
ErrorActualizarTablas:
Unload frmInfo
MsgBox "ActualizarTablas : " & Err & " " & Error$, vbCritical
Call frmMain.HabilitaMenues(True)
Call frmMain.HabilitaBotones(True)
Call frmMain.HabiBotones2
Call Hourglass(hwnd, False)
Err = 0
End Sub
'actualizar las vistas de la conexión
Public Sub ActualizarVistas()
On Local Error GoTo ErrorActualizarVistas
Dim ci As ComboItem
Dim ActiveConexion As Integer
Dim K As Integer
If Not imgConexiones.SelectedItem Is Nothing Then
Call Hourglass(hwnd, True)
Call frmMain.HabilitaMenues(False)
Call frmMain.HabilitaBotones(False)
Load frmInfo
frmInfo.Label1.Caption = "Actualizando información de vistas ..."
frmInfo.Show
DoEvents
lvwVistas.ListItems.Clear
Set ci = imgConexiones.SelectedItem
ActiveConexion = ConexionActiva(ci.Text)
'cargar vistas
Set Rs = DBConnection(ActiveConexion).OpenSchema(adSchemaTables, Array(Empty, Empty, Empty, "VIEW"))
K = 1
Do While Not Rs.EOF
If Left$(UCase$(Rs!table_name), 4) <> "MSYS" Then
ReDim Preserve cState(ActiveConexion).aVistas(K)
cState(ActiveConexion).aVistas(K).Nombre = Trim$(Rs!table_name)
If IsNull(Rs!Description) Then
cState(ActiveConexion).aVistas(K).Descripción = ""
Else
cState(ActiveConexion).aVistas(K).Descripción = Trim$(Rs!Description)
End If
K = K + 1
End If
Rs.MoveNext
Loop
Rs.Close
'cargar vistas
For K = 1 To UBound(cState(ActiveConexion).aVistas)
Set itmx = lvwVistas.ListItems.Add(, "v" & K, cState(ActiveConexion).aVistas(K).Nombre, 8, 8)
itmx.SubItems(1) = cState(ActiveConexion).aVistas(K).Descripción
Next K
tabInfo.Tabs(3).Caption = "&Vistas (" & lvwVistas.ListItems.Count & ")"
Unload frmInfo
Set ci = Nothing
Call frmMain.HabilitaMenues(True)
Call frmMain.HabilitaBotones(True)
Call frmMain.HabiBotones2
Call Hourglass(hwnd, False)
Else
MsgBox "Debe seleccionar una conexión.", vbCritical
End If
Exit Sub
ErrorActualizarVistas:
Unload frmInfo
MsgBox "ActualizarVistas : " & Err & " " & Error$, vbCritical
Call frmMain.HabilitaMenues(True)
Call frmMain.HabilitaBotones(True)
Call frmMain.HabiBotones2
Call Hourglass(hwnd, False)
Err = 0
End Sub
'agrega un procedimiento almacenado
Public Sub AddProc()
Dim ActiveConexion As Integer
If Not imgConexiones.SelectedItem Is Nothing Then
ActiveConexion = ConexionActiva(imgConexiones.SelectedItem.Text)
frmNuevoProc.IndexConexion = ActiveConexion
frmNuevoProc.Show vbModal
Else
MsgBox "Debe seleccionar una conexión.", vbCritical
End If
End Sub
Private Sub BuscarTabla()
Dim K As Integer
Dim Busqueda As String
Dim ci As ComboItem
Dim itmx As ListItem
Dim ActiveConexion As Integer
Dim j As Integer
Call frmMain.HabilitaMenues(False)
Call frmMain.HabilitaBotones(False)
DoEvents
If Not imgConexiones.SelectedItem Is Nothing Then
Call Hourglass(hwnd, True)
Set ci = imgConexiones.SelectedItem
ActiveConexion = ConexionActiva(ci.Text)
On Local Error GoTo Salir
'cargar tablas
lvwTablas.ListItems.Clear
Busqueda = Trim$(txtBuscar.Text)
If Len(Trim$(Busqueda)) = 0 Or Busqueda = "*.*" Then
'cargar todas
For K = 1 To UBound(cState(ActiveConexion).aTablas)
Set itmx = lvwTablas.ListItems.Add(, , cState(ActiveConexion).aTablas(K).Nombre, 5, 5)
itmx.SubItems(1) = cState(ActiveConexion).aTablas(K).Descripción
Next K
Else
j = 1
For K = 1 To UBound(cState(ActiveConexion).aTablas)
If cState(ActiveConexion).aTablas(K).Nombre Like Busqueda Then
Set itmx = lvwTablas.ListItems.Add(, , cState(ActiveConexion).aTablas(K).Nombre, 5, 5)
itmx.SubItems(1) = cState(ActiveConexion).aTablas(K).Descripción
j = j + 1
End If
Next K
If lvwTablas.ListItems.Count = 0 Then
MsgBox "No se han encontrado tablas con esa coincidencia.", vbCritical
End If
End If
Call Hourglass(hwnd, False)
End If
Set ci = Nothing
Set itmx = Nothing
Call frmMain.HabilitaMenues(True)
Call frmMain.HabilitaBotones(True)
Call frmMain.HabiBotones2