[WD17] HChangeConnection [SOLVED]

Startbeitrag von David Egan am 06.12.2013 04:45

I have 2 apps which use the same analysis. Analysis is defined as ClassicHF but in my project code I change to HFCS. Project 1 has worked correctly for ages. I have a procedure which does the connection so I copied this to the 2nd project where it refuses to work; for some reason the HChangeConnection command has no effect.

I've run it through the debugger, everything comes up the same between the 2 projects. The connection variable has exactly the same parameters, HOpenConnection returns True and HChangeConnection returns true.

My connection procedure has parameters for server type, database name etc. I've checked for errant spaces etc & I've even manually entered the values directly into the code in the procedure, in case there was something odd happening there. Still worked perfectly in Project 1 but not in Project 2. I've deleted the CPL folder, recompiled, rebooted etc but still the same story.

I'm at my wits end here. Does anyone have any suggestions as to what else to try?



PS. I should have mentioned that my procedure is in a global class. If I declare the connection variable local to the procedure it works in Project 2. However declaring the connection variable global to the class (as it is in Project )1 doesn't work!

[SOLVED] Changed declaration of global variables so the connection is now the first variable declared & it works! Go figure.:confused:


Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.