I created a function in PowerBuilder.NET Hello World. The project compiled as Helloworld.dll, generated in C# from the PowerBuilder utility. Inside Helloworld, I made the non-visual n_cst_helloworld. Inside the non-visual, I made the object function of_hello(). These are the issues I encountered when trying to access Helloworld.n_cst_helloworld.of_hello() in an external function on SQL Anywhere.
The external function uses CLR and is called in Interactive SQL right now.
Here is the script I'm trying to launch in iSQL (through ASA):
ALTER PROCEDURE "DBA"."ext_helloworld"()
EXTERNAL NAME
'helloworld.dll::Helloworld.n_cst_helloworld.of_hello( )'
LANGUAGE CLR
Then, I use the following in iSQL:
START EXTERNAL ENVIRONMENT CLR;
CALL ext_helloworld();
Which then gives me the following error:
Could not execute statement. Procedure 'ext_helloworld' terminated with unhandled exception 'Method 'Helloworld.n_cst_helloworld.of_hello' not found.'
SQLCODE = -91
So, I know that I have the object in the correct folder, and registered through REGASM and all that, otherwise it would give me the error of "object not found" that I'd seen before.
I'm confused because it seems that SQL Anywhere knows that the object n_cst_helloworld exists, but it doesn't recognize the methods that were generated using the PowerBuilder.NET utility. I don't know how to proceed to be able to use this method through ASA.
Currently I'm using ASA 12, PB12, PB.NET and have both 3.5 and 4.0 installed.