SQAPL throws value error

General APL language issues

SQAPL throws value error

Postby woody on Sat May 21, 2016 2:27 pm

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:

DAPL140SQADLL.JPG


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
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: SQAPL throws value error

Postby Morten|Dyalog on Sun May 22, 2016 7:38 am

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.
User avatar
Morten|Dyalog
 
Posts: 453
Joined: Tue Sep 09, 2008 3:52 pm


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest