File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 3
3
⍝ ⍺ ←→ config obj
4
4
c t←⍺
5
5
status←⊃##.SQA.Describe ⍵
6
- isConnected←status≠1
7
- isConnected:status
6
+ IsSuccesful status:status
8
7
p←c ##.Config.GetConnectionParameters ⍵
9
8
status←##.SQA.Connect p
10
- 0≠⊃ status:DisplayOdbcError status
9
+ ~IsSuccesful status:DisplayOdbcError status
11
10
t ##.GUI.AddConnectionTab ⍵
12
11
}
Original file line number Diff line number Diff line change
1
+ IsSuccesful←{
2
+ ⍝ ⍵ ←→ status number
3
+ ⍝ Treat non-fatal warnings (¯1) as a success
4
+ ⍵<1
5
+ }
Original file line number Diff line number Diff line change 4
4
query←⊃{⍺,' ',⍵}/(session.edit.Text)
5
5
headers←ExtractHeaders query
6
6
r←##.SQA.Do CurrentConnection query
7
- dbError←0≠⊃r
8
- dbError:DisplayOdbcError r
9
- table←⊃3⊃r
10
- grid←session.##.##.output.grid ⍝ REVISIT, create ParentForm fn
7
+ ~IsSuccesful⊃r:DisplayOdbcError r
8
+ grid←(##.GUI.GetParentForm session).output.grid
11
9
grid.ColTitles←headers
12
- grid.Values←table
10
+ grid.Values←⊃3⊃r
13
11
##.GUI.AutoSizeCols grid
14
12
}
You can’t perform that action at this time.
0 commit comments