progress 11.1
this sometimes bites me, and I can never remember why. So, I'm making my ignorance public in order to be able so search for the problem and solution when it next happens
I have a project in OEA/PDS that uses a standard assemblies setup, and have a dll called Npgsql.dll in the root of my project folder
I have added the dll to the assemblies reference, and can browse the assembly reference
the code completion in OEA finds the dll, and makes all the appropriate suggestions
*but*
despite the code completion completing the line
def var conn as Npgsql.NpgsqlConnection no-undo.
I still get a syntax error
Invalid datatype specified: Npgsql.NpgsqlConnection
when I type Npgsql. the NpgsqlConnection is suggested !
so, for the public record , and public humiliation, what am I doing wrong ?
of course, the second I post, I see a potential problem
in the class browser, I see
"Npgsql.NpgsqlConnection cannot be instantiated as it has private constructors"
however, the c# code that accompanies the dll is thus
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;User Id=joe;Password=secret;Database=joedata;");
so, if c# can do it, what's the magic trick for Progress ?
jmls wrote:
of course, the second I post, I see a potential problem
in the class browser, I see
"Npgsql.NpgsqlConnection cannot be instantiated as it has private constructors"
however, the c# code that accompanies the dll is thus
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;User Id=joe;Password=secret;Database=joedata;");
so, if c# can do it, what's the magic trick for Progress ?
This code compile for me, with a newly-downloaded Npgsql2.0.12. I haven't tried running it because I don't have Postgres installed (don't actually know why I'm responding, given that you do )
def var conn as Npgsql.NpgsqlConnection no-undo.
conn = new Npgsql.NpgsqlConnection("Server=127.0.0.1;Port=5432;User Id=joe;Password=secret;Database=joedata;").
Note: running OE 11.1 and I downloaded the .NET 4.0 version.
There's something else wrong.
-- peter
jmls wrote:
Invalid datatype specified: Npgsql.NpgsqlConnection
when I type Npgsql. the NpgsqlConnection is suggested !
so, for the public record , and public humiliation, what am I doing wrong ?
Well, if it's for a good cause like public humiliation I do have an almost exact scenario but on 10.2B with MS Exchange Web Service (EWS) managed API... have a case with technical support on this but don't expect to get any where with it. I can use all classes in that damn assembly but the ExchangeService one, alas one can't do nothing without that class
Marian,
Tangentially related, Bruce Gruenbaum did some integration with Exchange Web services, that he documented at http://www.thesoftwaregorilla.com/2010/07/exchange-web-services-example-part-4-subscriptions-and-notifications/ . Maybe this can help?
-- peter
Ah, OK. I'd not read the article again because I remembered (or thought I did) that he used .NET for this stuff. I should learn to read again
I could have sworn it was .NET ...
-- peter
marianedu wrote:
Julian really deserve to be punished for even trying to connect to postgresql, what he was thinking?
Oi! When progress can run on a raspberry Pi, then we can talk punishment
Ok, so that I can get it working like what you have (!) would you be able to say step by step how / where you installed the dll ?
I just don't get how it appears in the class browser just fine but does not compile. Other parts do (like Npgsql.Keywords) so it looks like part of the dll registered, but not all ?
What version of progress are you using ? Patch level ?
I'm on 11.1 vanilla
Thanks for the help
Ok, interesting. It's working now.
I downloaded the .net3.5 version (I was using the 4.0)
also copied in the monosecurity and policy2.0 dlls as well (just in case)
Unblocked all the files (right-mouse click each one, unblock)
added assembly using the local assemblies tab
very odd. But thanks
getting old, mate.
damn sir, you're always ahead
just closed my case on TS as it turn out the .NOT version matters... tried to wrap the damn class in my own C# and found out there was only 4.0 installed while 10.2B works with 3.5, once I had them install 3.5 on that computer it works just fine from ABL, weird though... no error as it can't load the asembly but only see parts of it's content
I could have sworn it was .NET ...
-- peter
indeed, it's .NOT... argh, .NOT... hmm, might be the keyboard but the closest I can get is Mono
yeah, but for my case 11.1 is meant to support .net 4.0
lol