Skip to content

Commit 2aa3eb6

Browse files
committed
Allow connect on warnings
1 parent 6cc4658 commit 2aa3eb6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

APLSource/DB/Connect.aplf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
⍝ ⍺ ←→ config obj
44
c t←⍺
55
status←⊃##.SQA.Describe ⍵
6-
isConnected←status≠1
7-
isConnected:status
6+
IsSuccesful status:status
87
p←c ##.Config.GetConnectionParameters ⍵
98
status←##.SQA.Connect p
10-
0≠⊃status:DisplayOdbcError status
9+
~IsSuccesful status:DisplayOdbcError status
1110
t ##.GUI.AddConnectionTab ⍵
1211
}

APLSource/DB/IsSuccesful.aplf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
IsSuccesful←{
2+
⍝ ⍵ ←→ status number
3+
⍝ Treat non-fatal warnings (¯1) as a success
4+
⍵<1
5+
}

APLSource/DB/RunQuery.aplf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
query←⊃{⍺,' ',⍵}/(session.edit.Text)
55
headers←ExtractHeaders query
66
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
119
grid.ColTitles←headers
12-
grid.Values←table
10+
grid.Values←⊃3⊃r
1311
##.GUI.AutoSizeCols grid
1412
}

0 commit comments

Comments
 (0)