SQAPL throws value error
2 posts
• Page 1 of 1
SQAPL throws value error
Greetings.
For some reason, I am getting this Value Error using the SQAPL workspace and SQA namespace with Dyalog APL 14.0.
I don't see these functions in the namespace.
⍙CallRL
⍙CallR
Thoughts?
VALUE ERROR
⍙SQAPL[5] 3=⍴⍵:check ⍙CallRL ⍵
∧
)fns
Apl2Scar BrowseConnect Cancel Close Columns Connect CursorName DSN DefaultXlate Describe Do Exec ExecDirect ExecN Fetch FileVersion
GetData GetInfo GetWarning Init NativeSQL Parse Prepare PutData Scar2Apl SetColumns SetData SetDelete SetExec SetInsert SetPrepare
SetUpdate Tables Transact Tree TypeInfo X buildcovers dxlate ⍙SQAPL ⍙SQAPL1 ⍙SQAParse
⎕VR '⍙SQAPL'
∇ ⍙SQAPL←{
[1] check←{
[2] 0≠⊃⍵:('DLL Error: ',,⍕⍵)⎕SIGNAL 999
[3] 2=⍴⍵:⊃1↓⍵
[4] 1↓⍵}
[5] 3=⍴⍵:check ⍙CallRL ⍵
[6] 2=⍴⍵:check ⍙CallR ⍵,0
[7] 'SQAPL call error'⎕SIGNAL 11
[8] }
∇
Here's some interesting variables that reference an external DLL:
)vars
⍙dllname ⍙naedfns
⍙dllname
I4 "C:\Program Files (x86)\Dyalog\Dyalog APL 14.0 Unicode\cwdya62u32w".C32|
⍙naedfns
⍙SQAInit SetXlate GetXlate ⍙CallR ⍙CallRL ToYMD ToYWD FromYMD FromYWD Micros
I see this DLL in the referenced path:
PROGRESS...
I believe there is something that causes some variables or functions to be present ... and then removed. This seems like it is a toggle of some kind.
I have instances of this working fine...
But, this sequence of SQA functions throws the error.
It seems that I can not run Close '.' twice. ?
Close '.'
0
)vars
⍙dllname ⍙naedfns
Close '.'
VALUE ERROR
⍙SQAPL[5] 3=⍴⍵:check ⍙CallRL ⍵
)vars
⍙dllname ⍙naedfns
UPDATE:
OK.. it seems to be specific to running Close '.' twice in a row.
Per the SQAPL user's guide:
Disconnecting from a Service
The function SQA.Close can be used to close any SQAPL object. When applied to a connection object, all children of the connection (its cursors) are closed, and you are disconnected from the driver. All files, network conversations and host logons associated with the connection are also closed.
SQA.Close 'C1'
0
SQA.Close '.'
0
If you close the root object using an argument of '.' or '#', you will disconnect all existing services, and unload the database drivers.
I found that if I FIRST perform a Connect ... even to an invalid DSN name...
I then can perform the Close '.' without error.
But, I can not perform two Close '.' in a row.
I have a work-around...
Sincere thanks!
//W
For some reason, I am getting this Value Error using the SQAPL workspace and SQA namespace with Dyalog APL 14.0.
I don't see these functions in the namespace.
⍙CallRL
⍙CallR
Thoughts?
VALUE ERROR
⍙SQAPL[5] 3=⍴⍵:check ⍙CallRL ⍵
∧
)fns
Apl2Scar BrowseConnect Cancel Close Columns Connect CursorName DSN DefaultXlate Describe Do Exec ExecDirect ExecN Fetch FileVersion
GetData GetInfo GetWarning Init NativeSQL Parse Prepare PutData Scar2Apl SetColumns SetData SetDelete SetExec SetInsert SetPrepare
SetUpdate Tables Transact Tree TypeInfo X buildcovers dxlate ⍙SQAPL ⍙SQAPL1 ⍙SQAParse
⎕VR '⍙SQAPL'
∇ ⍙SQAPL←{
[1] check←{
[2] 0≠⊃⍵:('DLL Error: ',,⍕⍵)⎕SIGNAL 999
[3] 2=⍴⍵:⊃1↓⍵
[4] 1↓⍵}
[5] 3=⍴⍵:check ⍙CallRL ⍵
[6] 2=⍴⍵:check ⍙CallR ⍵,0
[7] 'SQAPL call error'⎕SIGNAL 11
[8] }
∇
Here's some interesting variables that reference an external DLL:
)vars
⍙dllname ⍙naedfns
⍙dllname
I4 "C:\Program Files (x86)\Dyalog\Dyalog APL 14.0 Unicode\cwdya62u32w".C32|
⍙naedfns
⍙SQAInit SetXlate GetXlate ⍙CallR ⍙CallRL ToYMD ToYWD FromYMD FromYWD Micros
I see this DLL in the referenced path:
PROGRESS...
I believe there is something that causes some variables or functions to be present ... and then removed. This seems like it is a toggle of some kind.
I have instances of this working fine...
But, this sequence of SQA functions throws the error.
It seems that I can not run Close '.' twice. ?
Close '.'
0
)vars
⍙dllname ⍙naedfns
Close '.'
VALUE ERROR
⍙SQAPL[5] 3=⍴⍵:check ⍙CallRL ⍵
)vars
⍙dllname ⍙naedfns
UPDATE:
OK.. it seems to be specific to running Close '.' twice in a row.
Per the SQAPL user's guide:
Disconnecting from a Service
The function SQA.Close can be used to close any SQAPL object. When applied to a connection object, all children of the connection (its cursors) are closed, and you are disconnected from the driver. All files, network conversations and host logons associated with the connection are also closed.
SQA.Close 'C1'
0
SQA.Close '.'
0
If you close the root object using an argument of '.' or '#', you will disconnect all existing services, and unload the database drivers.
I found that if I FIRST perform a Connect ... even to an invalid DSN name...
I then can perform the Close '.' without error.
But, I can not perform two Close '.' in a row.
I have a work-around...
Sincere thanks!
//W
-
woody - Posts: 144
- Joined: Tue Dec 28, 2010 12:54 am
- Location: Atlanta, Georgia USA
Re: SQAPL throws value error
SQA.Init loads DLLs and cover-functions defined using ⎕NA. SQA.Close of the root object ('.') unloads the DLLs - this is intentional. You need another SQA.Init '' after closing the root.
I'll file a request to make that explicit in the documentation.
I'll file a request to make that explicit in the documentation.
-
Morten|Dyalog - Posts: 454
- Joined: Tue Sep 09, 2008 3:52 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group